I have a monitor which displays the current time/date, and a random slideshow. When the slideshow start, it creates a list of all image files in a directory, randomizes it, and then pop pictures from it until it is empty, at which point it will generate a new one. It pops pictures at a specific interval.
I saw a picture which would make a awesome background image, and I want to find it. The problem is that I got about 50 GB of pictures, and I wont search them manually.
So my plan is to find the seed of the random object in the slideshow. If you don't specify a seed in the random objects constructor, it will use the Enviroment.TickCount property, which returns the number of milliseconds since the system started.
I know aproximentally when the picture was at the screen, and processes remember the time they started, so I could in fact calculate the seed of the random object. I also remember the last image in the slideshow sequence, due to a 5 secound delay when it generates a new sequence, so I can easily see if I got the seed right.
However, DateTime.Now does not seem to be precice to the millisecond, so if I could get that sorted out I would have to check a lot less pictures.
Sub Main()
Dim SystemStartTime = Now.AddMilliseconds(-Environment.TickCount)
Console.WriteLine(SystemStartTime.Millisecond) REM Prints different numbers each time. They should be equal
Console.ReadLine()
End Sub