MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / timeAgo

Function timeAgo

cmd/inject-cli/main.go:288–297  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

286}
287
288func timeAgo(t time.Time) string {
289 d := time.Since(t).Truncate(time.Second)
290 if d < time.Minute {
291 return fmt.Sprintf("%ds ago", int(d.Seconds()))
292 }
293 if d < time.Hour {
294 return fmt.Sprintf("%dm%ds ago", int(d.Minutes()), int(d.Seconds())%60)
295 }
296 return fmt.Sprintf("%dh%dm ago", int(d.Hours()), int(d.Minutes())%60)
297}
298
299func schemaKeys(schema map[string]any) string {
300 if schema == nil {

Callers 2

cmdSessionsFunction · 0.85
printSessionInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected