Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
//nolint:revive
package xtime
import "time"
var clock Clock = &RealClock{}
func SetClock(c Clock) {
clock = c
}
func Now() time.Time {
return clock.Now()
}
func Since(t time.Time) time.Duration {
return clock.Since(t)
}
func Until(t time.Time) time.Duration {
return clock.Until(t)
}
func Sleep(d time.Duration) {
clock.Sleep(d)
}
type Clock interface {
Now() time.Time
Since(t time.Time) time.Duration
Until(t time.Time) time.Duration
Sleep(d time.Duration)
}