DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
#ifndef POSIX_TIME_CONFIG_HPP___ #define POSIX_TIME_CONFIG_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/time_duration.hpp" #include "boost/date_time/time_resolution_traits.hpp" #include "boost/date_time/gregorian/gregorian_types.hpp" #include "boost/date_time/wrapping_int.hpp" #include "boost/limits.hpp" #include "boost/date_time/compiler_config.hpp" #include "boost/cstdint.hpp" #include
#include
//for MCW 7.2 std::abs(long long) namespace boost { namespace posix_time { //Remove the following line if you want 64 bit millisecond resolution time //#define BOOST_GDTL_POSIX_TIME_STD_CONFIG #ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG // set up conditional test compilations #define BOOST_DATE_TIME_HAS_MILLISECONDS #define BOOST_DATE_TIME_HAS_MICROSECONDS #define BOOST_DATE_TIME_HAS_NANOSECONDS typedef date_time::time_resolution_traits
time_res_traits; #else // set up conditional test compilations #define BOOST_DATE_TIME_HAS_MILLISECONDS #define BOOST_DATE_TIME_HAS_MICROSECONDS #undef BOOST_DATE_TIME_HAS_NANOSECONDS typedef date_time::time_resolution_traits< boost::date_time::time_resolution_traits_adapted64_impl, boost::date_time::micro, 1000000, 6 > time_res_traits; // #undef BOOST_DATE_TIME_HAS_MILLISECONDS // #undef BOOST_DATE_TIME_HAS_MICROSECONDS // #undef BOOST_DATE_TIME_HAS_NANOSECONDS // typedef date_time::time_resolution_traits
time_res_traits; #endif //! Base time duration type /*! \ingroup time_basics */ class time_duration : public date_time::time_duration
{ public: typedef time_res_traits rep_type; typedef time_res_traits::day_type day_type; typedef time_res_traits::hour_type hour_type; typedef time_res_traits::min_type min_type; typedef time_res_traits::sec_type sec_type; typedef time_res_traits::fractional_seconds_type fractional_seconds_type; typedef time_res_traits::tick_type tick_type; typedef time_res_traits::impl_type impl_type; time_duration(hour_type hour, min_type min, sec_type sec, fractional_seconds_type fs=0) : date_time::time_duration
(hour,min,sec,fs) {} time_duration() : date_time::time_duration
(0,0,0) {} //! Construct from special_values time_duration(boost::date_time::special_values sv) : date_time::time_duration
(sv) {} //Give duration access to ticks constructor -- hide from users friend class date_time::time_duration
; private: explicit time_duration(impl_type ticks) : date_time::time_duration
(ticks) {} }; #ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG //! Simple implementation for the time rep struct simple_time_rep { typedef gregorian::date date_type; typedef time_duration time_duration_type; simple_time_rep(date_type d, time_duration_type tod) : day(d), time_of_day(tod) { // make sure we have sane values for date & time if(!day.is_special() && !time_of_day.is_special()){ if(time_of_day >= time_duration_type(24,0,0)) { while(time_of_day >= time_duration_type(24,0,0)) { day += date_type::duration_type(1); time_of_day -= time_duration_type(24,0,0); } } else if(time_of_day.is_negative()) { while(time_of_day.is_negative()) { day -= date_type::duration_type(1); time_of_day += time_duration_type(24,0,0); } } } } date_type day; time_duration_type time_of_day; bool is_special()const { return(is_pos_infinity() || is_neg_infinity() || is_not_a_date_time()); } bool is_pos_infinity()const { return(day.is_pos_infinity() || time_of_day.is_pos_infinity()); } bool is_neg_infinity()const { return(day.is_neg_infinity() || time_of_day.is_neg_infinity()); } bool is_not_a_date_time()const { return(day.is_not_a_date() || time_of_day.is_not_a_date_time()); } }; class posix_time_system_config { public: typedef simple_time_rep time_rep_type; typedef gregorian::date date_type; typedef gregorian::date_duration date_duration_type; typedef time_duration time_duration_type; typedef time_res_traits::tick_type int_type; typedef time_res_traits resolution_traits; #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers #else BOOST_STATIC_CONSTANT(boost::int64_t, tick_per_second = 1000000000); #endif }; #else class millisec_posix_time_system_config { public: typedef boost::int64_t time_rep_type; //typedef time_res_traits::tick_type time_rep_type; typedef gregorian::date date_type; typedef gregorian::date_duration date_duration_type; typedef time_duration time_duration_type; typedef time_res_traits::tick_type int_type; typedef time_res_traits::impl_type impl_type; typedef time_res_traits resolution_traits; #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers #else BOOST_STATIC_CONSTANT(boost::int64_t, tick_per_second = 1000000); #endif }; #endif } }//namespace posix_time #endif
posix_time_config.hpp
Page URL
File URL
Prev
4/15
Next
Download
( 5 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.