Changeset 78802 for trunk/boost/thread/xtime.hpp
- Timestamp:
- Jun 3, 2012, 6:11:52 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/boost/thread/xtime.hpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/boost/thread/xtime.hpp
r46124 r78802 3 3 // Copyright (C) 2007-8 Anthony Williams 4 4 // 5 // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 // Distributed under the Boost Software License, Version 1.0. (See accompanying 6 6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 7 … … 21 21 enum xtime_clock_types 22 22 { 23 TIME_UTC =123 TIME_UTC_=1 24 24 // TIME_TAI, 25 25 // TIME_MONOTONIC, … … 54 54 #endif 55 55 } 56 56 57 57 }; 58 58 … … 61 61 xtime res; 62 62 boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0); 63 63 64 64 res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds()); 65 65 res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second())); … … 69 69 inline int xtime_get(struct xtime* xtp, int clock_type) 70 70 { 71 if (clock_type == TIME_UTC )71 if (clock_type == TIME_UTC_) 72 72 { 73 73 *xtp=get_xtime(get_system_time()); … … 82 82 if (xt1.sec == xt2.sec) 83 83 return (int)(xt1.nsec - xt2.nsec); 84 else 84 else 85 85 return (xt1.sec > xt2.sec) ? 1 : -1; 86 86 }
Note: See TracChangeset
for help on using the changeset viewer.
