MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / time_until_secs

Method time_until_secs

src/core/include/megbrain/utils/timer.h:15–19  ·  view source on GitHub ↗

get time untile another time point

Source from the content-addressed store, hash-verified

13
14 //! get time untile another time point
15 double time_until_secs(const TimeSpec& end) const {
16 // cast to int to avoid softfloat on 32bit platforms
17 return static_cast<int>(end.sec - sec) +
18 static_cast<int>(end.nsec - nsec) * 1e-9;
19 }
20};
21
22template <class TimerTrait>

Callers 2

do_elapsed_time_untilMethod · 0.80
get_secsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected