Skip to content

Commit ba1c72b

Browse files
committed
Add sleeping time
1 parent b78b7f7 commit ba1c72b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

SaveWin10Pictures/Program.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Diagnostics;
44
using System.IO;
55
using System.Reflection;
6+
using System.Threading;
67

78
namespace SaveWin10Pictures
89
{
@@ -106,15 +107,20 @@ private static void Main()
106107

107108

108109
// keeps running for pc up all the time until Q key is pressed
109-
110+
111+
ConsoleKeyInfo consoleKeyPressed;
112+
DateTime timeToCheck = DateTime.Now;
110113
do
111114
{
112115
Console.ForegroundColor = ConsoleColor.Yellow;
113116
display("Press Q to quit or let it run forever:");
114-
cki = Console.ReadKey();
115-
117+
display("Press S to open Source directory:");
118+
display("Press T to open Target directory:");
119+
consoleKeyPressed = Console.ReadKey();
120+
// Check every 24 hours
121+
Thread.Sleep(5000);
116122

117-
} while (cki.Key != ConsoleKey.Q);
123+
} while (consoleKeyPressed.Key != ConsoleKey.Q);
118124

119125
Console.ForegroundColor = ConsoleColor.Yellow;
120126
display("Press any key to exit:");

0 commit comments

Comments
 (0)