GetSystemTime (kernel32)
Last changed: -84.131.214.178

.
Summary
Retrieves system timing information. On a multiprocessor system, the values returned are the sum of the designated times across all processors.

C# Signature:

[DllImport("kernel32.dll")]

static extern void GetSystemTime(out SystemTime t);

User-Defined Types:

[StructLayout(LayoutKind.Sequential)]

struct SystemTime

{

    public ushort Year;
    public ushort Month;
    public ushort DayOfWeek;
    public ushort Day;
    public ushort Hour;
    public ushort Minute;
    public ushort Second;
    public ushort Milliseconds;

}

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

SystemTime t = new SystemTime();

GetSystemTime(out t); // If SystemTime is of type struct we have to use out

Console.WriteLine(t.Year);

Alternative Managed API:

Do you know one? Please contribute it!

Documentation