void _ftime(
struct _timeb *timeptr
);
void _ftime32(
struct __timeb32 *timeptr
);
void _ftime64(
struct __timeb64 *timeptr
);
_ftime 函数获取当前本地时间并将其存储结构指向的 timeptr。_timeb __timeb32,和 __timeb64 结构在SYS\Timeb.h中定义。 这些包含四个字段,下表中列出。
_ftime64,使用 __timeb64 结构,允许文件创建日期,3000 年 12 月 31 日23:59:59,UTC;而 _ftime32 是表示日期2038 年1 月 19 日03:14:07,UTC。 1970 年 1 月 1 日 00:00:00,是所有这些函数的下限的日期范围。
_ftime 与 _ftime64 等效,_timeb 包含 64 位时。 这符合,除非__USE_32BIT_TIME_T 定义旧行为,在实际情况下为;__ftime 使用 32 位时,_timeb 包含 32 位时。
_ftime验证其参数。 如果 timeptr 传递 null 指针,函数会调用无效参数处理程序,如 参数验证 所述。 如果允许执行继续,则该函数返回 -1 并将 errno 设置为EINVAL。