diff options
| author | DemonKingSwarn <rockingswarn@gmail.com> | 2025-01-26 13:58:45 +0530 |
|---|---|---|
| committer | DemonKingSwarn <rockingswarn@gmail.com> | 2025-01-26 13:58:45 +0530 |
| commit | 275a3459b8acf025b7ada074b9e574b44927dbcf (patch) | |
| tree | 8b72f6480436b221bf5691032576da2a14259404 /Program.cs | |
| parent | e832d4de9209236b6d222b7ce1c062fb9e66871c (diff) | |
| download | hypr-wellbeing-275a3459b8acf025b7ada074b9e574b44927dbcf.zip hypr-wellbeing-275a3459b8acf025b7ada074b9e574b44927dbcf.tar.gz | |
chore: Total Screen Usage added
Diffstat (limited to 'Program.cs')
| -rw-r--r-- | Program.cs | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -46,12 +46,27 @@ class Program data[key] = value; } } + + TimeSpan totalTime = TimeSpan.Zero; + + foreach (var entry in data) + { + if (TimeSpan.TryParse(entry.Value, out TimeSpan time)) + { + totalTime += time; + } + } + + Console.WriteLine($"Today's Screen Usage\t{totalTime}"); + Console.WriteLine($"{red}{new string('-', 60)}{reset}"); Console.WriteLine($"{yellow}{"App",-30}{"Time",30}{reset}"); Console.WriteLine($"{red}{new string('-', 60)}{reset}"); + foreach (var entry in data) { Console.WriteLine($"{blue}{entry.Key,-30}{reset}{green}{entry.Value,30}{reset}"); } + } } |
