Curl namelookup_time

Andre Pany via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Nov 23 00:24:46 PST 2016


Hi,

I try to get some cUrl measurements like name lookup time.

pragma(lib, "curl");
import std.stdio, std.net.curl, etc.c.curl;

void main()
{
	Curl curl;
	curl.initialize();
	curl.set(CurlOption.url, "https://www.google.com");
	curl.perform();
	
	double d;
	curl_easy_getinfo(&curl, CurlInfo.namelookup_time, &d);
	writeln(d);
}

While the cUrl console application return values like "0,015",
this coding returns values like "9.71874e-311".

Where is the bug?

Kind regards
André


More information about the Digitalmars-d-learn mailing list