cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osaGetTime.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Ankur Kapoor, Anton Deguet, Min Yang Jung
7  Created on: 2004-04-30
8 
9  (C) Copyright 2004-2008 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 */
20 
21 
27 #ifndef _osaGetTime_h
28 #define _osaGetTime_h
29 
31 #include <string>
32 
36 double CISST_EXPORT osaGetTime(void);
37 
38 #if 0
39 #include <ctime> // for struct timeval and other useful functions
40 
41 struct osaAbsoluteTime {
42  long sec; // seconds
43  long nsec; // nano-seconds
44 };
45 
46 void CISST_EXPORT osaGetAbsoluteTime(osaAbsoluteTime & now);
47 // Note that time can be printed using ctime(now.sec);
48 #endif
49 
51 void CISST_EXPORT osaGetDateTimeString(std::string & str, const char delimiter = '-');
53 void CISST_EXPORT osaGetDateTimeString(std::string & str, double time, const char delimiter = '-');
55 void CISST_EXPORT osaGetDateString(std::string & str, double time, const char delimiter = ':');
57 void CISST_EXPORT osaGetTimeString(std::string & str, double time, const char delimiter = ':');
58 
59 
60 
61 
63 void CISST_EXPORT osaGetTimeString(std::string & str);
64 
65 #endif // _osaGetTime_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void CISST_EXPORT osaGetTimeString(std::string &str, double time, const char delimiter= ':')
double CISST_EXPORT osaGetTime(void)
Macros to export the symbols of cisstOSAbstraction (in a Dll).
void CISST_EXPORT osaGetDateTimeString(std::string &str, const char delimiter= '-')
long sec
Definition: osaTimeServer.h:37
void CISST_EXPORT osaGetDateString(std::string &str, double time, const char delimiter= ':')
long nsec
Definition: osaTimeServer.h:38
Definition: osaTimeServer.h:36