vul_get_timestamp.h
Go to the documentation of this file.
1 // This is core/vul/vul_get_timestamp.h
2 #ifndef vul_get_timestamp_h_
3 #define vul_get_timestamp_h_
4 
5 //:
6 // \file
7 // \brief Obtains time elapsed since 1 Jan 1970, in seconds and milliseconds
8 // \author fsm
9 //
10 // \verbatim
11 // Modifications
12 // PDA (Manchester) 21/03/2001: Tidied up the documentation
13 // \endverbatim
14 
15 
16 #include <string>
17 #ifdef _MSC_VER
18 # include <vcl_msvc_warnings.h>
19 #endif
20 
21 
22 //: purpose: obtain time elapsed since 1 Jan 1970, in seconds and milliseconds.
23 void vul_get_timestamp(int &secs, int &msecs);
24 
25 
26 //: Enum to specify style option for vul_get_time_as_string()
28 {
29  vul_asc, //!< format used by std:asctime() e.g. "Fri Dec 8 14:54:17 2006"
30  vul_numeric_msf //!< space-separated numbers, most significant first "e.g. 2006 12 08 14 54 17"
31 };
32 
33 //: Get the present time and date as a string, e.g. "Fri Dec 8 14:54:17 2006"
35 
36 
37 #endif // vul_get_timestamp_h_
format used by std:asctime() e.g. "Fri Dec 8 14:54:17 2006"
vul_time_style
Enum to specify style option for vul_get_time_as_string().
space-separated numbers, most significant first "e.g. 2006 12 08 14 54 17"
std::string vul_get_time_as_string(vul_time_style style=vul_asc)
Get the present time and date as a string, e.g. "Fri Dec 8 14:54:17 2006".
void vul_get_timestamp(int &secs, int &msecs)
purpose: obtain time elapsed since 1 Jan 1970, in seconds and milliseconds.