MCPcopy Create free account
hub / github.com/github/gh-aw / parseTokenUsageTimestamp

Function parseTokenUsageTimestamp

pkg/cli/token_usage.go:274–285  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

272}
273
274func parseTokenUsageTimestamp(value string) (time.Time, bool) {
275 if value == "" {
276 return time.Time{}, false
277 }
278 if ts, err := time.Parse(time.RFC3339Nano, value); err == nil {
279 return ts, true
280 }
281 if ts, err := time.Parse(time.RFC3339, value); err == nil {
282 return ts, true
283 }
284 return time.Time{}, false
285}
286
287// findTokenUsageFile searches for token-usage.jsonl in the run directory
288func findTokenUsageFile(runDir string) string {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected