Ignore:
Timestamp:
Jun 3, 2012, 6:11:52 PM (6 years ago)
Author:
viboes
Message:

Thread: fix TIME_UTC, WINVER, constexpr for tags, and don't use local files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/thread/xtime.hpp

    r46124 r78802  
    33// Copyright (C) 2007-8 Anthony Williams
    44//
    5 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
     5//  Distributed under the Boost Software License, Version 1.0. (See accompanying
    66//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    77
     
    2121enum xtime_clock_types
    2222{
    23     TIME_UTC=1
     23    TIME_UTC_=1
    2424//    TIME_TAI,
    2525//    TIME_MONOTONIC,
     
    5454#endif
    5555    }
    56    
     56
    5757};
    5858
     
    6161    xtime res;
    6262    boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
    63            
     63
    6464    res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
    6565    res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
     
    6969inline int xtime_get(struct xtime* xtp, int clock_type)
    7070{
    71     if (clock_type == TIME_UTC)
     71    if (clock_type == TIME_UTC_)
    7272    {
    7373        *xtp=get_xtime(get_system_time());
     
    8282    if (xt1.sec == xt2.sec)
    8383        return (int)(xt1.nsec - xt2.nsec);
    84     else 
     84    else
    8585        return (xt1.sec > xt2.sec) ? 1 : -1;
    8686}
Note: See TracChangeset for help on using the changeset viewer.