D语言新手问题 Dlang 如果获取包含微秒的时间戳

· Created · Last modified by Brian replied at · 182 times read

需要使用Dlang的系统库std.datetime.systime

long microtime()
{
    import std.datetime.systime;
    SysTime systime2 = Clock.currTime;
    return systime2.toUnixTime!(long)()*1000+systime2.fracSecs().total!("msecs");
}
Login to reply