MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / SetTime

Method SetTime

lib/mdflib/mdflib/src/mdf3timestamp.cpp:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void Mdf3Timestamp::SetTime(uint64_t time) {
24 date_ = MdfHelper::NanoSecToDDMMYYYY(time);
25 time_ = MdfHelper::NanoSecToHHMMSS(time);
26 local_timestamp_ = time + MdfHelper::GmtOffsetNs();
27 utc_offset_ = static_cast<int16_t>(MdfHelper::GmtOffsetNs() /
28 kNanosecondsPerHour);
29 time_quality_ = 0;
30 timer_id_ = "Local PC Reference Time";
31}
32
33void Mdf3Timestamp::SetTime(mdf::ITimestamp& timestamp) {
34 if (dynamic_cast<UtcTimestamp*>(&timestamp)) {

Callers

nothing calls this directly

Calls 3

GetTimezoneMinMethod · 0.80
GetDstMinMethod · 0.80
GetTimeNsMethod · 0.45

Tested by

no test coverage detected