Check to see if steam.exe is running in task manager. If it is, begin a timer that logs time to a local file every 5 seconds
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace PlaytimeLog { class Program { static void Main(string[] args) { string myDocPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); if (File.Exists(@"C:\Users\admin\source\repos\PlaytimeLog\PlaytimeLog\bin\Debug\log.txt"))//check if file exists { string readText = File.ReadAllText(@"C:\Users\admin\source\repos\PlaytimeLog\PlaytimeLog\bin\Debug\log.txt");//read all text from log.txt file Console.WriteLine(readText);//display log.txt file } else { Console.WriteLine("No log.txt file exists"); } if (