Going to Sleep

I got the fun assignment of implementing some object locking mechanisms. That is some good stuff. Me and another developer debated the design. When we were done, I was off to the races to code.

Now the general idea was to check whether there were other locks, and if so, wait a while before checking again. A little while made me think of sleeping and giving up my thread until a certain duration had passed.

My instinct told me to call the sleep() function, passing it the number of milliseconds I wanted to wait. The compiler did not recognize sleep(). Okay. I just need to find the correct header file to include. Was is ? No. that one is only valid for UNIX. I am on Windows XP. Then I figured out the error of my ways. I already included . However that header file has you call Sleep() instead. Notice the capital S.

Now I am unit test the basics of my implementation. My virtual machine is super slow. Perhaps it is time to call it a day (and a week).