mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 15:18:44 +05:00
Added RunningSince to cgr-console status
This commit is contained in:
committed by
Dan Christian Bogos
parent
db7826a5d7
commit
f4d6f4fca8
@@ -46,6 +46,20 @@ import (
|
||||
"github.com/cgrates/rpcclient"
|
||||
)
|
||||
|
||||
var startCGRateSTime time.Time
|
||||
|
||||
func init() {
|
||||
startCGRateSTime = time.Now()
|
||||
}
|
||||
|
||||
func GetTimeElapsedFromStart() string {
|
||||
return time.Now().Sub(startCGRateSTime).Round(time.Second).String()
|
||||
}
|
||||
|
||||
func GetStartTime() string {
|
||||
return startCGRateSTime.Format(time.UnixDate)
|
||||
}
|
||||
|
||||
func NewCounter(start, limit int64) *Counter {
|
||||
return &Counter{
|
||||
value: start,
|
||||
|
||||
Reference in New Issue
Block a user