struct tm* time OVER HEAD question
I am trying to use the <ctime> struct *tm storage class. I am having problems with getting consistant results when accessing the members of the struct. When printing out the time in a loop, I get 0's 75% of the time (i rarely get the stored time). The behavior is somewhat bizzard because in other location in my software I conistanly get the correct results. So my question is, Is there a lot of overhead in using this *tm struct, and could this be causing my problems or do "you" think my problem lies some where else.
(I noticed that if I put a Sleep(x) in front of where I am access the time elements I get better results..but still not 100% which is what I need)
Is there a better alternative to using this storage class?