共用方式為


Time Functions

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The following tables show the time functions with a description of the purpose of each.

Functions Description

CompareFileTime

Compares two 64-bit file times.

FileTimeToLocalFileTime

Converts a file time based on the Universal Time Coordinate (UTC) to a local file time.

FileTimeToSystemTime

Converts a 64-bit file time to system time format.

GetCurrentFT

Returns a system time converted to a FILETIME based on the Coordinated Universal Time.

GetFileTime

Retrieves the date and time that a file was created, last accessed, and last modified.

GetIdleTime

Returns the amount of time, in milliseconds, that the system has been idle.

GetLocalTime

Retrieves the current local date and time.

GetSystemTime

Retrieves the current system date and time.

GetTickCount

For Release configurations, this function returns the number of milliseconds since boot, excluding any time that the system was suspended.

For Debug configurations, this function returns the number of milliseconds since boot minus 180 seconds.

GetTimeZoneInformation

Retrieves current time-zone information.

LocalFileTimeToFileTime

Converts a local file time to a file time based on the UTC.

QueryPerformanceCounter

Retrieves the current value of the high-resolution performance counter, if one is provided by the OEM.

QueryPerformanceFrequency

Retrieves the frequency of the high-resolution performance counter, if one is provided by the OEM.

Random

Generates a random number.

SetDaylightTime

Wets the current state of daylight saving time.

SetFileTime

Wets the date and time that a file was created, last accessed, or last modified.

SetLocalTime

Sets the current local time and date.

SetSystemTime

Sets the current system time and date.

SetTimeZoneInformation

Sets current time-zone information.

SystemTimeToFileTime

Converts a system time to a file time.

See Also

Reference

Time Reference

Other Resources