MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / getChainTimeString

Method getChainTimeString

sqlchain/runtime.go:186–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184}
185
186func (r *runtime) getChainTimeString() string {
187 diff := r.now().Sub(r.chainInitTime)
188 height := diff / r.period
189 offset := diff % r.period
190 return fmt.Sprintf("[@%d+%.9f]", int32(height), offset.Seconds())
191}
192
193func (r *runtime) getNextTurn() int32 {
194 r.stateMutex.Lock()

Callers 2

logEntryMethod · 0.80
logEntryWithHeadStateMethod · 0.80

Calls 1

nowMethod · 0.95

Tested by

no test coverage detected