private static long CalculateLockExpire(TimeSpan ts, int timeout) { return (long)(ts.TotalSeconds + timeout + 1.5); }