Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace meditationInterface
- {
- class Program
- {
- static void Main(string[] args)
- {
- DateTime s, f = new DateTime();
- TimeSpan part, all = new TimeSpan();
- TimeSpan avg = new TimeSpan();
- int count = 0;
- Console.WriteLine("Press any key to start");
- Console.ReadKey();
- Console.WriteLine("Started!");
- Console.WriteLine("--------------------------------------------");
- while (true)
- {
- s = DateTime.Now;
- Console.ReadKey();
- f = DateTime.Now;
- part = f.Subtract(s);
- all += part;
- count++;
- avg = all / count;
- Console.WriteLine("--------------------------------------------");
- Console.Write("This part: ");
- Console.WriteLine( part);
- Console.Write("Distractions: ");
- Console.WriteLine(count);
- Console.Write("Äverage part length: ");
- Console.WriteLine(avg);
- Console.WriteLine("--------------------------------------------");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement