File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ bool Duration::parse_units (Pig& pig)
324324 if (durations[i].unit == unit &&
325325 durations[i].standalone )
326326 {
327- _period = static_cast <int > (durations[i].seconds );
327+ _period = static_cast <time_t > (durations[i].seconds );
328328 return true ;
329329 }
330330 }
@@ -370,7 +370,7 @@ bool Duration::parse_units (Pig& pig)
370370 if (durations[i].unit == unit)
371371 {
372372 seconds = durations[i].seconds ;
373- _period = static_cast <int > (number * static_cast <double > (seconds));
373+ _period = static_cast <time_t > (number * static_cast <double > (seconds));
374374 return true ;
375375 }
376376 }
@@ -526,7 +526,7 @@ int Duration::minutes () const
526526}
527527
528528// //////////////////////////////////////////////////////////////////////////////
529- int Duration::seconds () const
529+ time_t Duration::seconds () const
530530{
531531 return _period;
532532}
Original file line number Diff line number Diff line change @@ -58,22 +58,22 @@ class Duration
5858 int days () const ;
5959 int hours () const ;
6060 int minutes () const ;
61- int seconds () const ;
61+ time_t seconds () const ;
6262
6363private:
6464 void clear ();
6565 void resolve ();
6666 std::string dump () const ;
6767
6868public:
69- int _year {0 };
70- int _month {0 };
71- int _weeks {0 };
72- int _day {0 };
73- int _hours {0 };
74- int _minutes {0 };
75- int _seconds {0 };
76- time_t _period {0 };
69+ int _year {0 };
70+ int _month {0 };
71+ int _weeks {0 };
72+ int _day {0 };
73+ int _hours {0 };
74+ int _minutes {0 };
75+ time_t _seconds {0 };
76+ time_t _period {0 };
7777};
7878
7979#endif
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ void testParse (
3939 int in_day,
4040 int in_hours,
4141 int in_minutes,
42- int in_seconds,
42+ time_t in_seconds,
4343 time_t in_period,
4444 const std::string& output,
4545 const std::string& hours,
You can’t perform that action at this time.
0 commit comments