|
Beam-lib
2.16.3
This is the Beam C++ class library.
|
#include <BTimeStampMs.h>
Public Member Functions | |
| BTimeStampMs (BString str="") | |
| ~BTimeStampMs () | |
| void | clear () |
| Clear the date/time. More... | |
| void | setNow () |
| Set the timeStamp to now. More... | |
| void | setFirst () |
| Set the first date available. More... | |
| void | setLast () |
| Set the last date available. More... | |
| void | set (time_t time, int milliSeconds=0) |
| Set time using Unix time (seconds from 1970-01-01) More... | |
| void | setYDay (int year=0, int yday=0, int hour=0, int minute=0, int second=0, int milliSecond=0) |
| void | setTime (int hour=0, int minute=0, int second=0, int milliSecond=0) |
| BTimeStampMs & | addMilliSeconds (int milliSeconds) |
| Add the given number of milli seconds. This should be less that a year. More... | |
| BTimeStampMs & | subMilliSeconds (int milliSeconds) |
| Add the given number of milli seconds. This should be less that a year. More... | |
| BTimeStampMs & | addSeconds (int seconds) |
| Add the given number of seconds. This should be less that a year. More... | |
| BTimeStampMs & | subSeconds (int seconds) |
| Subtract the given number of seconds. This should be less that a year. More... | |
| uint32_t | getYearSeconds () |
| Get number of seconds within the year. More... | |
| uint64_t | getYearMilliSeconds () |
| Get number of seconds within the year. More... | |
| BString | getString (BString separator="T") |
| Get the time as an ISO date/time string. More... | |
| BString | getStringNoMs (BString separator="T") |
| Get the time as an ISO date/time string with no ms. More... | |
| BError | setString (BString dateTime) |
| Set the time from an ISO date/time. More... | |
| BString | getDurationString (BString separator="T") |
| Get the time as an ISO date/time string but with month's and days starting from 0. More... | |
| BString | getDurationStringNoMs (BString separator="T") |
| Get the time as an ISO date/time string but with month's and days starting from 0 with no ms. More... | |
| BError | setDurationString (BString dateTime) |
| Set the time from an ISO date/time string but with month's and days starting from 0. More... | |
| BString | getStringRaw () |
| void | getDate (int &year, int &mon, int &day) |
| Get the year, month and day. More... | |
| int | compare (const BTimeStampMs &timeStamp) |
| Compare two dates. More... | |
| int | operator> (const BTimeStampMs &timeStamp) |
| int | operator>= (const BTimeStampMs &timeStamp) |
| int | operator< (const BTimeStampMs &timeStamp) |
| int | operator<= (const BTimeStampMs &timeStamp) |
Static Public Member Functions | |
| static int | isLeap (int year) |
| static BUInt64 | difference (BTimeStampMs t2, BTimeStampMs t1) |
Public Attributes | |
| uint16_t | year |
| Year (2000 .. 3000) More... | |
| uint16_t | yday |
| Day in year (0 .. 365) More... | |
| uint16_t | hour |
| Hour (0 .. 23) More... | |
| uint16_t | minute |
| Minute (0 .. 59) More... | |
| uint16_t | second |
| Second (0 .. 59) More... | |
| uint16_t | milliSecond |
| MilliSecond (0 .. 999) More... | |
| int32_t | sampleNumber |
| The sample number this time refers to. More... | |
| BTimeStampMs::BTimeStampMs | ( | BString | str = "" | ) |
| BTimeStampMs::~BTimeStampMs | ( | ) |
| BTimeStampMs & BTimeStampMs::addMilliSeconds | ( | int | milliSeconds | ) |
Add the given number of milli seconds. This should be less that a year.
| BTimeStampMs & BTimeStampMs::addSeconds | ( | int | seconds | ) |
Add the given number of seconds. This should be less that a year.
| void BTimeStampMs::clear | ( | ) |
Clear the date/time.
| int BTimeStampMs::compare | ( | const BTimeStampMs & | timeStamp | ) |
Compare two dates.
|
static |
| void BTimeStampMs::getDate | ( | int & | year, |
| int & | mon, | ||
| int & | day | ||
| ) |
Get the year, month and day.
Get the time as an ISO date/time string but with month's and days starting from 0.
Get the time as an ISO date/time string but with month's and days starting from 0 with no ms.
Get the time as an ISO date/time string with no ms.
| BString BTimeStampMs::getStringRaw | ( | ) |
| uint64_t BTimeStampMs::getYearMilliSeconds | ( | ) |
Get number of seconds within the year.
| uint32_t BTimeStampMs::getYearSeconds | ( | ) |
Get number of seconds within the year.
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
| void BTimeStampMs::set | ( | time_t | time, |
| int | milliSeconds = 0 |
||
| ) |
Set time using Unix time (seconds from 1970-01-01)
Set the time from an ISO date/time string but with month's and days starting from 0.
| void BTimeStampMs::setFirst | ( | ) |
Set the first date available.
| void BTimeStampMs::setLast | ( | ) |
Set the last date available.
| void BTimeStampMs::setNow | ( | ) |
Set the timeStamp to now.
| void BTimeStampMs::setTime | ( | int | hour = 0, |
| int | minute = 0, |
||
| int | second = 0, |
||
| int | milliSecond = 0 |
||
| ) |
| void BTimeStampMs::setYDay | ( | int | year = 0, |
| int | yday = 0, |
||
| int | hour = 0, |
||
| int | minute = 0, |
||
| int | second = 0, |
||
| int | milliSecond = 0 |
||
| ) |
| BTimeStampMs & BTimeStampMs::subMilliSeconds | ( | int | milliSeconds | ) |
Add the given number of milli seconds. This should be less that a year.
| BTimeStampMs & BTimeStampMs::subSeconds | ( | int | seconds | ) |
Subtract the given number of seconds. This should be less that a year.
| uint16_t BTimeStampMs::hour |
Hour (0 .. 23)
| uint16_t BTimeStampMs::milliSecond |
MilliSecond (0 .. 999)
| uint16_t BTimeStampMs::minute |
Minute (0 .. 59)
| int32_t BTimeStampMs::sampleNumber |
The sample number this time refers to.
| uint16_t BTimeStampMs::second |
Second (0 .. 59)
| uint16_t BTimeStampMs::yday |
Day in year (0 .. 365)
| uint16_t BTimeStampMs::year |
Year (2000 .. 3000)
1.8.15