mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-12-27 04:05:39 +08:00
23 lines
334 B
Go
23 lines
334 B
Go
package tls
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/sagernet/sing/common/ntp"
|
|
)
|
|
|
|
type TimeServiceWrapper struct {
|
|
ntp.TimeService
|
|
}
|
|
|
|
func (w *TimeServiceWrapper) TimeFunc() func() time.Time {
|
|
if w.TimeService == nil {
|
|
return nil
|
|
}
|
|
return w.TimeService.TimeFunc()
|
|
}
|
|
|
|
func (w *TimeServiceWrapper) Upstream() any {
|
|
return w.TimeService
|
|
}
|