add PISystemTime::toFrequency(), add PILog
This commit is contained in:
@@ -117,6 +117,11 @@ void PISystemTime::toTimespec(void * ts) {
|
||||
}
|
||||
|
||||
|
||||
PISystemTime::Frequency PISystemTime::toFrequency() {
|
||||
return PISystemTime::Frequency::fromSystemTime(*this);
|
||||
}
|
||||
|
||||
|
||||
PIString PISystemTime::toString() const {
|
||||
static const PISystemTime is_abs_thr = 3650._d; // 10 years
|
||||
if ((*this) >= is_abs_thr) return PIDateTime::fromSystemTime((*this)).toString("yyyy-MM-dd hh:mm:ss.zzz");
|
||||
|
||||
@@ -260,6 +260,10 @@ public:
|
||||
//! \~russian На *nix системах присваивает время к timespec структуре
|
||||
void toTimespec(void * ts);
|
||||
|
||||
//! \~english Returns \a Frequency that corresponds this time interval
|
||||
//! \~russian Возвращает \a Frequency соответствующую этому временному интервалу
|
||||
PISystemTime::Frequency toFrequency();
|
||||
|
||||
//! \~english Returns "yyyy-MM-dd hh:mm:ss.zzz" for absolute time and "<V> <d|h|m|s|ms|us|ns> ..." for relative
|
||||
//! \~russian Возвращает "yyyy-MM-dd hh:mm:ss.zzz" для абсолютного времени и "<V> <d|h|m|s|ms|us|ns> ..." для относительного
|
||||
PIString toString() const;
|
||||
|
||||
Reference in New Issue
Block a user