Changeset 10251
- Timestamp:
- 03/23/11 09:37:17 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/time.cc
r10183 r10251 4 4 5 5 using namespace std; 6 using namespace boost::posix_time; 6 7 7 8 int main(int, char **) … … 72 73 cout << endl; 73 74 75 const Time t0; 76 Time t1 = t0; 77 cout << "T0 = " << t0 << endl; 78 cout << "T1 = " << t1 << endl; 79 t1 += hours(4242); 80 cout << "T1 += 4242h: " << t1 << endl; 81 t1 += minutes(42); 82 cout << "T1 += 42min: " << t1 << endl; 83 t1 += seconds(42); 84 cout << "T1 += 42sec: " << t1 << endl; 85 cout << endl; 86 87 cout << "T1 - T0 = " << t1-t0 << endl; 88 89 const time_duration diff = t1-t0; 90 cout << "T1 - T0 = " << diff.total_seconds() << "sec" << endl; 91 cout << endl; 92 74 93 return 0; 75 94 }
Note:
See TracChangeset
for help on using the changeset viewer.