MCPcopy Create free account
hub / github.com/apache/mesos / create

Method create

3rdparty/libprocess/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 6

errorMethod · 0.65
createFunction · 0.50
TimeClass · 0.50
ErrorClass · 0.50
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected