GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing cplusplus.com — time Reference
function
<ctime>
timetime_t time (time_t* timer); Get current time
The function returns this value, and if the argument is not a null pointer, it also sets this value to the object pointed by timer. The value returned generally represents the number of seconds since 00:00 hours, Jan 1, 1970 UTC (i.e., the current unix timestamp). Although libraries may use a different representation of time: Portable programs should not use the value returned by this function directly, but always rely on calls to other elements of the standard library to translate them to portable types (such as localtime, gmtime or difftime). ParametersReturn ValueThe current calendar time as a time_t object.If the argument is not a null pointer, the return value is the same as the one stored in the location pointed by argument timer. If the function could not retrieve the calendar time, it returns a value of -1.time_t is an alias of a fundamental arithmetic type capable of representing times. Example
Possible output:
Data racesThe object pointed by timer is modified (if not null).Exceptions (C++)No-throw guarantee: this function never throws exceptions.See also
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us | |||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |