I wrote a program in C for my laptop to see how long the battery will last. As soon as the laptop goes to battery operation, it writes the start time(when the laptop went to battery) and current time to a file, then closes that file, and writes the same thing to another file then closes that file. It alternates between the two files continuously until the computer shuts off by itself. I used two files so that when the computer shuts down, one file was guaranteed to be written to and closed.
What I found was that if the battery lasted 2 hours, when I opened the files, I found that the last write was around 30mins before the computer actually shut down. Why would that be? What is Windows doing that the last half hour, or so, of writes was lost? Is there something I can do to force Windows to remember the last save?
Pete S - Tucson, AZ