time

来自cppreference.com
< c | chrono

 
 
日期和時間工具
功能
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
時間操作
Original:
Time manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
difftime
time
clock
格式轉換
Original:
Format conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
asctime
ctime
strftime
wcsftime
gmtime
localtime
mktime
常量
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
CLOCKS_PER_SEC
類型
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
tm
time_t
clock_t
 
Defined in header <time.h>
返回一個time_t對象編碼為當前日曆時間.
Original:
Returns the current calendar time encoded as a time_t object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目錄

[编辑] 參數

time -
指針到一個time_t對象或NULL存儲時間
Original:
pointer to a time_t object to store the time in or NULL
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 返回值

當前日曆時間編碼的為成功,time_t錯誤(time_t)(-1)對象。如果該參數不NULL,返回值是存儲在參數所指向的對象的值相等.​​
Original:
Current calendar time encoded as time_t object on success, (time_t)(-1) on error. If the argument is not NULL, the return value is equal to the value stored in the object pointed to by the argument.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 注釋

日曆時間的編碼time_t是不確定的,但大多數系統符合POSIX specification和返回值的紀元以來的秒數的整數類型。實現time_t是一個32位有符號整數(許多歷史實現)未能在2038年.
Original:
The encoding of calendar time in time_t is unspecified, but most systems conform to POSIX specification and return a value of integral type holding the number of seconds since the Epoch. Implementations in which time_t is a 32-bit signed integer (many historical implementations) fail in the year 2038.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 為例

[编辑] 另請參閱

因為時代的日曆時間轉換時間為本地時間表示
Original:
converts time since epoch to calendar time expressed as local time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函數) [edit]
轉換的時間,因為時代的日曆時間為協調世界時表示
Original:
converts time since epoch to calendar time expressed as Universal Coordinated Time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函數) [edit]