MCPcopy Create free account
hub / github.com/YourAverageTechBro/DevToolboxWeb / getApproximateTime

Function getApproximateTime

src/utils/clientUtils.ts:34–49  ·  view source on GitHub ↗
(seconds: number)

Source from the content-addressed store, hash-verified

32};
33
34export const getApproximateTime = (seconds: number) => {
35 const minutes = Math.floor(seconds / 60);
36 const hours = Math.floor(minutes / 60);
37 const days = Math.floor(hours / 24);
38
39 if (days > 0) {
40 return `${days} days`;
41 }
42 if (hours > 0) {
43 return `${hours} hours`;
44 }
45 if (minutes > 0) {
46 return `${minutes} minutes`;
47 }
48 return `${seconds} seconds`;
49};
50
51export const getPathFromToolType = (toolType: ToolType) => {
52 switch (toolType) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected