ceremonyclient/node/internal/frametime/frametime.go
Cassandra Heart dbd95bd9e9
v2.1.0 (#439)
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete

* 2.1.0 main node rollup
2025-09-30 02:48:15 -05:00

18 lines
510 B
Go

package frametime
import (
"time"
"source.quilibrium.com/quilibrium/monorepo/protobufs"
)
// AppFrameSince returns the time elapsed since the given frame was created.
func AppFrameSince(frame *protobufs.AppShardFrame) time.Duration {
return time.Since(time.UnixMilli(frame.Header.Timestamp))
}
// GlobalFrameSince returns the time elapsed since the given frame was created.
func GlobalFrameSince(frame *protobufs.GlobalFrame) time.Duration {
return time.Since(time.UnixMilli(frame.Header.Timestamp))
}