Sierra Toolkit  Version of the Day
FormatTime.hpp
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2010 Sandia Corporation. */
3 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */
4 /* license for use of this work by or on behalf of the U.S. Government. */
5 /* Export of this program may require a license from the */
6 /* United States Government. */
7 /*------------------------------------------------------------------------*/
8 
9 #ifndef stk_util_environment_FormatTime_hpp
10 #define stk_util_environment_FormatTime_hpp
11 
12 #include <string>
13 
14 namespace stk_classic {
15 
16 typedef unsigned long TimeFormat;
17 
18 enum {
19  TIMEFORMAT_NONE = 0x00,
20  TIMEFORMAT_HMS = 0x01,
21  TIMEFORMAT_SECONDS = 0x02,
22  TIMEFORMAT_STYLE_MASK = 0x0F,
23 
24  TIMEFORMAT_MILLIS = 0x10
25 };
26 
27 std::string formatTime(double time, TimeFormat time_format = TIMEFORMAT_HMS | TIMEFORMAT_MILLIS);
28 
29 } // namespace stk_classic
30 
31 #endif // stk_util_environment_FormatTime_hpp
Sierra Toolkit.