cisst-saw
Loading...
Searching...
No Matches
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
14This software is provided "as is" under an open source license, with
15no warranty. The complete license can be found in license.txt and
16http://www.cisst.org/cisst/license.txt.
17
18--- end cisst license ---
19*/
20
21
26
27#ifndef _osaGetTime_h
28#define _osaGetTime_h
29
31#include <string>
32
37
38#if 0
39#include <ctime> // for struct timeval and other useful functions
40
41struct osaAbsoluteTime {
42 long sec; // seconds
43 long nsec; // nano-seconds
44};
45
46void CISST_EXPORT osaGetAbsoluteTime(osaAbsoluteTime & now);
47// Note that time can be printed using ctime(now.sec);
48#endif
49
51void CISST_EXPORT osaGetDateTimeString(std::string & str, const char delimiter = '-');
53void CISST_EXPORT osaGetDateTimeString(std::string & str, double time, const char delimiter = '-');
55void CISST_EXPORT osaGetDateString(std::string & str, double time, const char delimiter = ':');
57void CISST_EXPORT osaGetTimeString(std::string & str, double time, const char delimiter = ':');
58
59
60
61
63void CISST_EXPORT osaGetTimeString(std::string & str);
64
65#endif // _osaGetTime_h
#define CISST_EXPORT
Definition cmnExportMacros.h:50
Macros to export the symbols of cisstOSAbstraction (in a Dll).
void CISST_EXPORT osaGetTimeString(std::string &str, double time, const char delimiter=':')
void CISST_EXPORT osaGetDateTimeString(std::string &str, const char delimiter='-')
double CISST_EXPORT osaGetTime(void)
void CISST_EXPORT osaGetDateString(std::string &str, double time, const char delimiter=':')
Definition osaTimeServer.h:36
long nsec
Definition osaTimeServer.h:38
long sec
Definition osaTimeServer.h:37