Add tags

Add tags to the following comment
WindowsAPIではGetLocalTime()関数を使うとミリ秒単位の時刻が取得できます。
ただし、クロックの分解能(精度)は15~16ミリ秒ほどのようです。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include <stdio.h>
#include <windows.h>

int main(int argc, char **argv)
{
    SYSTEMTIME    st;
    GetLocalTime(&st);
    printf("%04d%02d%02d%02d%02d%02d.%03d\n",
        st.wYear, st.wMonth,  st.wDay,
        st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
    return 0;
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...