MCPcopy Create free account
hub / github.com/3rdparty/libprocess / create

Method create

src/clock.cpp:479–488  ·  view source on GitHub ↗

TODO(benh): Introduce a Clock::time(seconds) that replaces this function for getting a 'Time' value.

Source from the content-addressed store, hash-verified

477// TODO(benh): Introduce a Clock::time(seconds) that replaces this
478// function for getting a 'Time' value.
479Try<Time> Time::create(double seconds)
480{
481 Try<Duration> duration = Duration::create(seconds);
482 if (duration.isSome()) {
483 // In production code, clock::advanced will always be zero!
484 return Time(duration.get() + *clock::advanced);
485 } else {
486 return Error("Argument too large for Time: " + duration.error());
487 }
488}
489
490} // namespace process {

Callers

nothing calls this directly

Calls 2

TimeClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected