[BW]: [Fix] Fixed gcc compile errors
This commit is contained in:
parent
21558dbd70
commit
af77f4dc4b
1 changed files with 7 additions and 5 deletions
|
|
@ -36,7 +36,7 @@ namespace fc {
|
|||
explicit time_point( microseconds e = microseconds() ) :elapsed(e){}
|
||||
static time_point now();
|
||||
static time_point maximum() { return time_point( microseconds::maximum() ); }
|
||||
static time_point (min)() { return time_point(); }
|
||||
static time_point min() { return time_point(); }
|
||||
operator fc::string()const;
|
||||
|
||||
static time_point from_iso_string( const fc::string& s );
|
||||
|
|
@ -48,10 +48,10 @@ namespace fc {
|
|||
bool operator <=( const time_point& t )const { return elapsed._count <=t.elapsed._count; }
|
||||
bool operator ==( const time_point& t )const { return elapsed._count ==t.elapsed._count; }
|
||||
bool operator !=( const time_point& t )const { return elapsed._count !=t.elapsed._count; }
|
||||
time_point& operator += ( const microseconds& m ) { elapsed+=m; return *this; }
|
||||
friend time_point operator + ( const time_point& t, const microseconds& m ) { return time_point(t.elapsed+m); }
|
||||
friend time_point operator - ( const time_point& t, const microseconds& m ) { return time_point(t.elapsed-m); }
|
||||
friend microseconds operator - ( const time_point& t, const time_point& m ) { return microseconds(t.elapsed.count() - m.elapsed.count()); }
|
||||
time_point& operator += ( const microseconds& m) { elapsed+=m; return *this; }
|
||||
time_point operator + (const microseconds& m) const { return time_point(elapsed+m); }
|
||||
time_point operator - (const microseconds& m) const { return time_point(elapsed-m); }
|
||||
microseconds operator - (const time_point& m) const { return microseconds(elapsed.count() - m.elapsed.count()); }
|
||||
private:
|
||||
microseconds elapsed;
|
||||
};
|
||||
|
|
@ -86,6 +86,8 @@ namespace fc {
|
|||
friend bool operator == ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds == b.utc_seconds; }
|
||||
time_point_sec& operator += ( uint32_t m ) { utc_seconds+=m; return *this; }
|
||||
|
||||
microseconds operator - (const time_point_sec& rhs) const { return microseconds(utc_seconds - rhs.utc_seconds);}
|
||||
|
||||
private:
|
||||
uint32_t utc_seconds;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue