Author Topic: Nspire time  (Read 7161 times)

0 Members and 1 Guest are viewing this topic.

_player1537

  • Guest
Nspire time
« on: August 29, 2010, 12:02:11 pm »
Is there something to return the time on the Nspire?  Like a function, or a ram area or something?

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Nspire time
« Reply #1 on: August 29, 2010, 12:08:02 pm »
Yeah, there are memory mapped timers. See here for the addresses. I haven't used the timer, though.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Nspire time
« Reply #2 on: August 29, 2010, 12:13:52 pm »
Ndless.me with the finest TI-Nspire programs

_player1537

  • Guest
Re: Nspire time
« Reply #3 on: August 29, 2010, 12:14:02 pm »
Ok, so what I need it for is to start at 0, and count up, and then check it later.  It seems like I'm going to need to set the bits like this (although I don't know how to in C):
900D0014 (location)
Bits:
00001111

That should: Run the timer, increase timer (instead of decrease), and run infinitely.  Is that correct?

Edit: actually, it looks like ExtendeD posted closer to what I wanted :)  But I still don't know how to read from that spot :/
« Last Edit: August 29, 2010, 12:15:14 pm by _player1537 »

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire time
« Reply #4 on: August 29, 2010, 12:18:29 pm »
Code: [Select]
int time = *(volatile unsigned*) 0x90090000
Be warned that this clock cannot measure any interval less than 1 second long.

_player1537

  • Guest
Re: Nspire time
« Reply #5 on: August 29, 2010, 12:22:10 pm »
Oh... ok.  I'll keep this information, I don't think I'll need it just yet, but I might have an idea for a game using this :D