? MILLISEC overflow (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

MILLISEC overflow

1 2
  • #1 ✎ 1785 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself MILLISEC is a 32 bit signed integer, so it overflows to a negative number after about 26 days (2147483647/1000/60/60/24 days). (This includes time spent in sleep mode) We predicted this would happen a long time ago, but I've never seen it until now. It actually broke some my code, because I assumed MILLISEC would always be greater than 0. The same thing can happen to MAINCNT, but it would take over a year (not including time spend in sleep mode, since MAINCNT doesn't increase then). Posted Edited by 12Me21
  • #2 ✎ 185 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    MILLISEC overflows to a negative number after about 26 days.
    Interresting. Why would you ever leave your 3DS on with SB open for around a month?
    Posted Edited by CyberYoshi64
  • #3 ✎ 292 ProKuku QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Night Person I like the quiet night and sleep late. Express Yourself Pokemon Is Awesome! I love Pokemon! Express Yourself I know somebody who never turns their 3ds off and just leaves it in sleep mode all the time... drives me insane Posted
  • #4 ✎ 185 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    I know somebody who never turns their 3ds off and just leaves it in sleep mode all the time... drives me insane
    Wouldn't that damage the 3DS's battery? (I think that they more likely charge it while in sleep mode.)
    Posted Edited by CyberYoshi64
  • #5 ✎ 1785 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Well, when's the last time you turned your phone off? Posted
  • #6 ✎ 185 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    Well, when's the last time you turned your phone off?
    I don't have one and even then I turn it off weekly.
    Posted
  • #7 ✎ 376 Chemicalex Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength osu! Is Awesome! I love osu! Express Yourself
    Well, when's the last time you turned your phone off?
    I don't have one and even then I turn it off weekly.
    what?
    Posted
  • #8 ✎ 185 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    Well, when's the last time you turned your phone off?
    I don't have one and even then I turn it off weekly.
    what?
    Sounds stange but it is. I turn it off every weekend because then I don't need it.
    Posted
  • #9 ✎ 731 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    Well, when's the last time you turned your phone off?
    I don't have one and even then I turn it off weekly.
    what?
    Sounds stange but it is. I turn it off every weekend because then I don't need it.
    But how can you turn your phone off if you don't have one?
    Posted
  • #10 ✎ 292 ProKuku QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Night Person I like the quiet night and sleep late. Express Yourself Pokemon Is Awesome! I love Pokemon! Express Yourself 10 questions science still can’t answer Posted
  • #11 ✎ 185 CyberYoshi64 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself
    But how can you turn your phone off if you don't have one?
    I reference this to my tablet essentially running the same OS as phones and its components are also very similar to normal phones. So literally I could say I have a phone which I can´t use as one due to it´s size.
    Posted
  • #12 ✎ 225 TheV360 Pokemon Is Awesome! I love Pokemon! Express Yourself First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself brb checking my millisec oh god Posted
  • #13 ✎ 1785 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I'm at ~-1800000000 let's see who can get to 0 Posted
  • #14 ✎ 333 spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength The same thing happens in Minecraft if a world lasts long enough Posted
  • #15 ✎ 731 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies If millisec went negative, then when checking the FPS using millisec would the FPS also be negative? Just imagine -60 FPS Posted
  • #16 ✎ 475 auceps
    If millisec went negative, then when checking the FPS using millisec would the FPS also be negative? Just imagine -60 FPS
    no although for the flip it would go really negative for a frame i guess?
    Posted
  • #17 ✎ 1785 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Usually there's some smoothing on the FPS display so it might stay negative for a while after MILLISEC overflows Posted
  • #18 ✎ 652 IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength
    The same thing happens in Minecraft if a world lasts long enough
    That's a cool random fact
    Posted Edited by IAmRalsei
  • #19 ✎ 225 TheV360 Pokemon Is Awesome! I love Pokemon! Express Yourself First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself 12Me21, you win this round, my 3DS battery died Edit: It was around ~-1500000000 last time I checked. Estimated to be around ~-1000000000 when it died. F. Posted Edited by TheV360
  • #20 ✎ 1785 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Currently at -60,000,000 EDIT: Aw I forgot about it and missed the time when it passed 0... Now just 1 more month until it overflows again... Posted Edited by 12Me21
1 2