MSDN Documentation

System API Reference

Function Header Summary
GetSystemTime Windows.h Retrieves the current system date and time.
SetSystemTime Windows.h Sets the current system date and time.
GetVersionEx Windows.h Retrieves operating system version information.
GetTickCount Windows.h Retrieves the number of milliseconds that have elapsed since the system was started.
GlobalMemoryStatusEx Windows.h Retrieves information about the system's current memory usage.

Example: Retrieving System Time

#include <Windows.h>
#include <iostream>

int main()
{
    SYSTEMTIME st;
    GetSystemTime(&st);
    std::cout << "UTC Time: "
              << st.wHour << ':' << st.wMinute << ':' << st.wSecond << std::endl;
    return 0;
}

Related Topics