Ejemplo n.º 1
0
Time ObjectHost::localTime(const SpaceID& space, const Time& t) {
    Duration off = clientTimeOffset(space);
    // FIXME we should probably return a negative time and force the code using
    // this (e.g. the loc update stuff) to make sure it handles it correctly by
    // extrapolating to a current time.
    // This is kinda gross, but we need to make sure result >= 0
    if ( (int64)t.raw() + off.toMicro() < 0) return Time::null();
    return t + off;
}