Sierra Toolkit Version of the Day
FormatTime.hpp
00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 #ifndef stk_util_environment_FormatTime_hpp
00010 #define stk_util_environment_FormatTime_hpp
00011 
00012 #include <string>
00013 
00014 namespace stk {
00015 
00016 typedef unsigned long TimeFormat;
00017 
00018 enum {
00019   TIMEFORMAT_NONE       = 0x00,
00020   TIMEFORMAT_HMS        = 0x01,
00021   TIMEFORMAT_SECONDS    = 0x02,
00022   TIMEFORMAT_STYLE_MASK = 0x0F,
00023   
00024   TIMEFORMAT_MILLIS     = 0x10
00025 };
00026 
00027 std::string formatTime(double time, TimeFormat time_format = TIMEFORMAT_HMS | TIMEFORMAT_MILLIS);
00028 
00029 } // namespace stk
00030 
00031 #endif // stk_util_environment_FormatTime_hpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines