MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / to_gps_time

Method to_gps_time

chirpstack/src/gpstime.rs:93–102  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

91
92impl ToGpsTime for DateTime<Utc> {
93 fn to_gps_time(&self) -> Duration {
94 let mut offset = Duration::zero();
95 for ls in LEAP_SECONDS_TABLE.iter() {
96 if &ls.0 < self {
97 offset += ls.1;
98 }
99 }
100
101 self.signed_duration_since(*GPS_EPOCH_TIME) + offset
102 }
103}
104
105impl ToDateTime for Duration {

Callers 11

test_get_beacon_startFunction · 0.80
ul_meta_data_to_rx_infoFunction · 0.80
enqueueFunction · 0.80
test_class_bFunction · 0.80
test_downlink_schedulerFunction · 0.80
handleFunction · 0.80
test_handleFunction · 0.80
handle_v1_app_time_reqFunction · 0.80
handle_v2_app_time_reqFunction · 0.80

Calls 1

iterMethod · 0.80

Tested by 4

test_get_beacon_startFunction · 0.64
test_class_bFunction · 0.64
test_downlink_schedulerFunction · 0.64
test_handleFunction · 0.64