DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
No more ctime(S) errors - Time(C++)

Conversion to and from time_t

As mentioned earlier, time_t is both (1) the standard UNIX System representation for absolute time, and (2) the type used internally to represent Time values. As such, the ``conversion'' to and from time_t values is particularly simple: function make_time() simply returns the Time with a given internal representation, while make_time_t() simply returns the internal representation of a given Time.

make_time() can be used to obtain the current Time by using the system call time(2) as follows:

       Time now = make_time(time(0));

Next topic: Auxiliary Time functions
Previous topic: Stream insertion

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005