Api: Timegettime() - timeGetTime() returns negative value

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Others

Api: Timegettime() - timeGetTime() returns negative value

Galahad
Ok, I have this weird problem, using timeGetTime() API. I'm using it in a small application, that shows current system up-time. Now, it has been working fine, but at some point, it started returning negative values, and it counts backwards (decrementing the value)...

I don't know if system uptime has anything to do with it; my system has been running for approximately 690 hours, and I first noticed a problem a few days back. Now, I know there is perfectly reasonable explanation for this, but it escapes me. I tried searching for this problem on the web, but had no success.

For example, timeGetTime() at some point started returning negative values: -2484000000, and counts down, to -2483999999, -2483999998, etc...

Is it just my comp freaking out, or Windows was not designed to run for so long? laugh.gif I don't want to restart it, but if that's the only way... smile.gif

Oh, btw, I'm using it inside Visual Basic app, but I would hope that has nothing to do with this weird problem biggrin.gif

Thanx in advance...

 

 

 


Reply

tzenes
This is a flaw in the windows timeGetTime function (not a bug), and is deterministic behaviour.

The windows SDK states:
QUOTE
Note that the value returned by the timeGetTime function is a DWORD value. The return value wraps around to 0 every 2^32 milliseconds, which is about 49.71 days. This can cause problems in code that directly uses the timeGetTime return value in computations, particularly where the value is used to control code execution. You should always use the difference between two timeGetTime return values in computations.


so every ~50 days one of your counters will reset before the other does
and when you take the difference of the two you will get a negitive number.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. timegettime returns same time - 13.64 hr back. (1)
  2. timegettime() example - 32.31 hr back. (1)
  3. php remove negative value - 33.91 hr back. (1)
  4. select comfort negitive - 49.27 hr back. (1)
  5. timegettime vb - 58.24 hr back. (1)
  6. vb6 timegettime() - 156.20 hr back. (1)
  7. timegettime not working - 167.91 hr back. (1)
  8. windows timegettime - 152.78 hr back. (2)
  9. vb6 timegettime example - 229.44 hr back. (1)
  10. timegettime windows - 321.85 hr back. (1)
  11. timegettime - 54.65 hr back. (17)
  12. timegettime visual basic 6 - 359.18 hr back. (1)
  13. timegettime vb6 - 210.26 hr back. (2)
  14. you should always use the difference between two timegettime return values in computations. - 411.72 hr back. (1)
Similar Topics

Keywords : api, timegettime, timegettime, returns, negative

  1. Posts To Mailing List Are Blocked
    Every post to the mailing list returns a Delivery failure notice. (1)
  2. E-filing Tax Returns In India.
    (0)
    This information i am posting here is specific to India and not any other country. Other countries
    might have a different options and policies... Even other ways. So.. if you are not in India.. You
    might have to skip this post. But then if you are interested to know these things you are welcome to
    read .. /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Just
    thought this might be of some use to all. This is regarding filing your income tax returns online. I
    do not know if i have sent this link already. http://www.incometaxindiaefilin....
  3. Turok
    Classic N64 shooter returns for the PS3 and XBOX 360 (2)
    In the dinosaur-themed PS3 and XBOX 360 first person shooter Turok, a remake of the classic N64
    shooter of the same name, you play an ex-military Special Forces soldier betrayed when his mentor
    Kane develops biological weapons. You join a rival mercenary group charged to capture Kane in a
    remote planet when you ship is shot down, forcing it to crash land scattering your unit forcing you
    to fight rampaging dinosaurs and Kane’s elite soldiers. Using your trusty bow and arrow as well as
    your standard weaponry, such as assault rifles, shotguns, flamethrowers and grenades, ....
  4. Help With Negative Credits [resolved]
    (3)
    Can you help me please I have negative credits -9 and i need to be reset to 0. Can someone help me
    please, and that one no be moderator because moderator can't help me too. I please need help, i
    have -9 credits, and my cod clan web site cannot be online. Thank you please Please note that this
    behaviour is unacceptable. As per previous Postings, and a reply to a PM, Credits are to be EARNED.
    Make good posts to acquire your Credits. Be advised that the next 'plea' for credits will be
    acted upon with a Warning on your Account. Topic Closed... ....
  5. Negative Credits
    It is not good idea (13)
    Hello dear trap17 I can see that you have this thing called negative credits. When i don't post
    on forums that many then my credits go in minus. So when i am not on forums then credits drop below
    0 and continue to go below zero. I was looking for good post to post, but me couldn't find good
    post on whole forums. I understand that you need credit to be hosted, and that is cool, but why
    don't you just suspend my account when i come to 0, and then leave it suspended, but don't
    count down in minus, because it is not good idea to go in minus. If you go my cre....
  6. Negative Credits
    How? (5)
    I don't know is this right place to write about problem, but i had 1 credit yesterday, and i
    came here to write some good and quality post but now i see that i have -4 credits. How did i lose 5
    credits in one day? Now am in panic and need to write something to get that credits /blink.gif"
    style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> Now i have 0.8 credits.
    Ok, i am sorry for this post, but i'm afraid to lose my hosting because i have my Call of Duty
    clan and i have website for that clan.....
  7. Website Suspended For Negative Credits
    But it hasn't come back (2)
    Okay, well, I let my account lapse for a little while (which I have done in the past as well) and
    after getting more hosting credits it usually comes back within a day. Well, I let it lapse like
    .03 credits accidentally about a week ago, and I've been posting every day and I'm back in
    the positive, but my website has yet to come back so I was just wondering why? Thanks, Cangor....
  8. Mermaid711 Returns The Favour To Evil Sm
    (3)
    Hahahaha sm, after almost four months, you finaly get my sig made /tongue.gif"
    style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> and yet it only took me 15
    minutes to make thisone /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0"
    alt="biggrin.gif" /> sorry it's not the best, i make everything from scratch, because if you
    dont that is cheating /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0"
    alt="laugh.gif" /> /ohmy.gif" style="vertical-align:middle" emoid=":o" border="0" alt="ohmy.gif" />
    And you BETTER ....
  9. Has The Trap17 Site Been Down For 1-2 Days? [resolved]
    I couldn't keep my credits over negative because of it (4)
    For the last, i dunno, 2-3 days I could not access the trap17 forums. My credits went down under 0
    since I could not access the forum and post posts. It's no big problem. My credits are fixable,
    but I just want to get a hang of why I could no access the forum in this period. Thank you!....
  10. Research Paper Titled: How Have The Negative Effects Of Computers Changed American Society?
    looking for comments about this paper (4)
    This is my research paper for my English class and so I am looking for comments mostly based on the
    structure of the essay and the flow of this research paper as well. But you can leave comments about
    the overall research paper as well. I am looking for serious comments so anything not related to
    this topic will be reported Thank you. Also this Research paper is copyrighted to Michael Anderson
    (that me). For reference this is a MLA styled research paper. UPDATES: after a couple of
    runthourgh through a couple of instructors and of course peoples comment here on trap ....
  11. Trackmania United Hands-on
    Nadeo's fun racing series returns with an emphasis on online integ (3)
    When it comes to racing, few games out there are as simple or as addictive as those in the
    TrackMania series from French developer Nadeo. Both 2004's TrackMania and 2005's TrackMania
    Sunrise offered up a lot of fun as you raced through elaborate, challenging tracks. Now Nadeo is
    working on TrackMania United, which looks to unify the large TrackMania community with an extensive
    online system. TrackMania United is even more challenging than previous TrackMania games, but the
    emphasis is still on fun. TrackMania United has a simplicity to it that's part of ....
  12. Select Comfort -negative Review
    good faith doesn't exist here (0)
    We bought, rather I bought a 2nd from the top of the line eastern king select comfort mattress and
    foundation several months ago and after moving our existing bed to the guest room I decided to hire
    a contractor and finish the master bedroom before setting up the new bed. So time goes by and
    finally I finish with the trim and paint and we set up the bed and sleep on it. It doesn't
    really bother me, but my wife wakes up with her neck and back hurting. We gave the bed three more
    nights, and her discomfort was such that she couldn't stand it any more. We pleaded w....
  13. Positive And Negative Feedback Appreciated...
    (1)
    Hi, I'm glad to have found this forum. My partners and I just launched our own MLM website:
    http://www.TrueFortune.com We've had very good success in building freebie sites (ya know, the
    complete 5 offers and get a free ipod), but we're unsure how well we will fare with this latest
    venture. With TrueFortune, we will be paying out cash per completed free trial/offer, as opposed
    to making users (and their referrals) complete X amount of offers and tell X amount of friends to
    earn a gift. We're not sure if this type of business will be profitable for u....
  14. How Do I Create An Array Of Objects?
    The code in the tutorial I have read returns an error upon compilation (3)
    I want to create an array of type Cards. Is this the right way of doing it? CODE Card
    decker[]; decker = new Card[5]; I always get the error DeckofCards: java:47:
    missing return statement whenever I compile this.....
  15. Who's Going To See Superman Returns?
    (8)
    I am thinking of going to see this movie in the theaters maybe in a few days from now. It does look
    good although I wished they would use the same Superman costume Christopher Reeve did. But after
    reading alot of great reviews about this great movie I am seriously considering going to see it. How
    many people in here has seen it already or are going to be seeing it in the next few days and let me
    know if you see any Superman fans wearing their own Superman Costumes. /biggrin.gif"
    style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />....
  16. Negative Disk Space Available
    problems with cPanel (2)
    I log onto my site CPanel and I can't do anything. It says that my Disk space available is: -0.5
    MB. Can someone please fix this problem? The problem has been solved. For some reason the CPanel
    now shows that my Disk Usage has turned back to normal. Thank you. Even if the problem has been
    solved, please retain the same topic name so other users can use it as a reference. ....
  17. Spanish Version Of American Anthem
    Negative Backlash for New Patriots (4)
    Full Story: Spanish 'Star-Spangled Banner' Draws Ire In summary, a new spanish version
    of the song "Star Spangled Banner" is being released and is drawing fire from different segments of
    the American population. The entire immigration issue is a large one, and if I write as much as I
    tend to about this subject I'm afraid that no one would reply. I don't know what it is about
    large, organized posts that scare people off... Ya know, our spanish population just want to be
    accepted, is what it comes down to. They're already here and, in many cases, ....
  18. Negative Perception Of Islam Is Increasing
    unfavorable view of Islam (22)
    Negative Perception Of Islam
    http://www.washingtonpost.com/wp-dyn/conte...;referrer=email This is not exactly hot news, but it
    is news and I think it's worth thinking about. According to a recent poll by the Washington
    Post, more Americans (46%) are having an unfavorable view of Islam, in particular that it encourages
    violence (33%). I think this increase is due to the negative information put forth by the media
    and the politicians, especially recently. Islam, from what I have heard, encourages peace and
    acceptance, not violence. The media ch....
  19. Transfer From Trap To Computing Host
    negative credit and I cannot log in (5)
    Hi, i was a user at trap17, (or still am) but just have not the time to post regularly, so I bought
    hosting at computinghost. however, I cannot log into my cpanel, to change the DNS setting to:
    NS1.COMPUTINGHOST.COM 64.69.35.170 NS2.COMPUTINGHOST.COM 64.69.35.177 is there a way, I can log
    into cpanel without the credit - maybe I just haven;t got the right password either... In other
    words. HELP! website to be tranfered is http://www.oldchapelarts.com Thanks....
  20. Alucard Returns, Yay! Xd
    More of my fav boss from Castlevania! (6)
    ---------------------....
  21. Activate My Hosting Again? How To Do It?
    went negative 4 (1)
    yo whats up..i went neg 4 so they terminated my account...how do i get it back???....
  22. Free Web Hosting: (negative Zero)
    Free Website: <negativezero.trap17.com> (1)
    To generate an application for free web hosting please click here: Free Web Hosting Request Form
    I would like to request free web hosting from Trap17. Please find my application below. Your
    Registered Domain Name or Desired Trap17 Subdomain Name: negativezero.trap17.com Account
    Username: negative Introduction: first of all I'm boxy, from the Phillipines. my
    hobbie is all about video games, programing in c and java (but still, i'm still a nob with it)
    and watching a lot of tv. Email Address: boxygrino@yahoo.com Age: ....
  23. I Had Negative Hosting Credits
    but my account still wasn't suspended (1)
    I'm not quite sure where to put this at, so I'll put it here. I was unable to post for a
    while, and when I logged in to my forum account, I had -4 days hosting credit. However, my site was
    still up. I used the forum search engine, and found nothing. I made a post and got my credits over
    1 day. However, as soon as I had my credits over 1, my account was suspended. I know I have to
    have about 4 or 5 credits, so that's not the question. Why did this happen right after I was
    over 1 day?....
  24. Negative Hosting Credits Suggestion
    (0)
    im suggesting that there should be a limit that your credits can go into the negatives. a while ago
    i was really busy with school, sports, and everyday stuff. during this time, i did not have much
    time to get online and i stopped going to this site for awhile. now i am back and want to get my
    site back up so i can try some things. the thing is, my credits are way below zero. currently im at
    -31 hosting credits. and you need 5 credits to get your site back up (i think its 5, not sure). i
    was thinking that it might be an okay idea if you put a limit to how far your credits....
  25. Negative Calorie Foods
    its for everyone who wants to be slim and fit. (36)
    have you ever heard of negative calorie foods? well, i just read about it at my mom's book,
    "negative calori foods".. okay.. i'll explain it to you.. well actually there isn't a
    single food on earth that has 0 calorie. but there are many foods, usually fruits and vegetables
    that could cause negative calories to whoever eats it. well.. for you to further understand.. there
    are foods containing less calories than it needs to digest them. for example.. there's this one
    calorie food that has a total of 100 calories. and i takes 150 to digest them.. so it....
  26. Hosting Credits After Going Negative
    (16)
    Hey, My account went negative in credits last night. I posted enough to get it up to about 2
    credits, how many does an account require to become reactivated? I lgoged on today and its still
    suspended. I plan on posting a bit tonight, been working a lot lately,but thats beside the point.
    Any reply would be greatly appreciated, Thanks....
  27. Negative Credits
    Deleted posts etc... (3)
    OK, i made a number of posts tonight on the forum, one was about a certain group that is trying to
    run the world, this got deleted... why? it was in no way violent or offensive... and the forum
    states, post what you have learnt/find interesting along them lines... so i posted it... it got
    deleted... various other posts have been missing and deleted, thus resulting in me loosing my
    hosting credits... im now in negatives and i dont beleive i have "spammed" the board with useless
    information or pure spam... i have stuck to the guide lines... please, tell me why? i have ....
  28. Negative Hosting Credits
    from +10 to -28 in one day! (23)
    This is the second time it happened to me. Just yesterday I had around +10 hosting credits and now
    its -28 and my account is suspended. Please help.....
  29. [army] Negative Money Gained
    ouch... (1)
    As mentioned in this thread , often when I attack someone and win, I "gain" a large negative
    quantity of money... and the person who lost gets that money. I think Thunder in particular has
    this happen when he is attacked, as well as some other users. It is *not cool* as the amount lost is
    always huge, and the only way I have found to get rid of the debt "dishonestly" is to convert the
    debt to weapon damage by trying to repair my swords. This is clearly not how the system was intended
    to work. Thanks for all the hard work going into making the upgrade - spies are awes....
  30. Happy Birthday Hatebreed!
    Many happy returns of the day! (6)
    Today is your day! Its your birthday and you turned 16! Hope you have fun and wish you many
    happy returns of the day!....

    1. Looking for api, timegettime, timegettime, returns, negative

Searching Video's for api, timegettime, timegettime, returns, negative
Similar
Posts To
Mailing List
Are Blocked
- Every post
to the
mailing list
returns a
Delivery
failure
notice.
E-filing Tax
Returns In
India.
Turok -
Classic N64
shooter
returns for
the PS3 and
XBOX 360
Help With
Negative
Credits
[resolved]
Negative
Credits - It
is not good
idea
Negative
Credits -
How?
Website
Suspended
For Negative
Credits -
But it
hasn't
come back
Mermaid711
Returns The
Favour To
Evil Sm
Has The
Trap17 Site
Been Down
For 1-2
Days?
[resolved] -
I
couldn't
keep my
credits over
negative
because of
it
Research
Paper
Titled: How
Have The
Negative
Effects Of
Computers
Changed
American
Society? -
looking for
comments
about this
paper
Trackmania
United
Hands-on -
Nadeo's
fun racing
series
returns with
an emphasis
on online
integ
Select
Comfort
-negative
Review -
good faith
doesn't
exist here
Positive And
Negative
Feedback
Appreciated.
..
How Do I
Create An
Array Of
Objects? -
The code in
the tutorial
I have read
returns an
error upon
compilation
Who's
Going To See
Superman
Returns?
Negative
Disk Space
Available -
problems
with cPanel
Spanish
Version Of
American
Anthem -
Negative
Backlash for
New Patriots
Negative
Perception
Of Islam Is
Increasing -
unfavorable
view of
Islam
Transfer
From Trap To
Computing
Host -
negative
credit and I
cannot log
in
Alucard
Returns,
Yay! Xd
- More of my
fav boss
from
Castlevania&
#33;
Activate My
Hosting
Again? How
To Do It? -
went
negative 4
Free Web
Hosting:
(negative
Zero) - Free
Website:
<negative
zero.trap17.
com>
I Had
Negative
Hosting
Credits -
but my
account
still
wasn't
suspended
Negative
Hosting
Credits
Suggestion
Negative
Calorie
Foods - its
for everyone
who wants to
be slim and
fit.
Hosting
Credits
After Going
Negative
Negative
Credits -
Deleted
posts etc...
Negative
Hosting
Credits -
from +10 to
-28 in one
day!
[army]
Negative
Money Gained
- ouch...
Happy
Birthday
Hatebreed
3; - Many
happy
returns of
the day!
advertisement



Api: Timegettime() - timeGetTime() returns negative value



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE