Less than 1 Millisecond Timing
Voir le premier message non lu • 5 messages
• Page 1 sur 1
Less than 1 Millisecond Timing
How can I run code at an interval of less than one millisecond? The Ti Lua API only allows me to use the timer event at an interval of greater than 10 milliseconds, or the timer.getMilliSecCounter() function which is still not a small enough interval.
-
Brindlefly
Niveau 2: MI2 (Membre Initié)- Messages: 3
- Inscription: 31 Mai 2015, 21:37
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Less than 1 Millisecond Timing
You definitively can't.
Anyway, if you updated the screen quicker than 100Hz it wouldn't work as all the calculations would take more time than your period (and that's often the case with a period of 0.01 s only).
Anyway, if you updated the screen quicker than 100Hz it wouldn't work as all the calculations would take more time than your period (and that's often the case with a period of 0.01 s only).
Dernière édition par pierrotdu18 le 31 Mai 2015, 21:50, édité 1 fois.
Bonjour
-
pierrotdu18Premium
Niveau 15: CC (Chevalier des Calculatrices)- Messages: 975
- Inscription: 07 Nov 2013, 20:18
- Localisation: Paris V
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: MP* Lycée Henri IV
Re: Less than 1 Millisecond Timing
So is less than one millisecond timing a ndless feature? There are some registers in the Gameboy Classic that increment faster than a millisecond, which makes me believe that the emulators can update faster than a millisecond or they just convert that calculation to one done every millisecond.
-
Brindlefly
Niveau 2: MI2 (Membre Initié)- Messages: 3
- Inscription: 31 Mai 2015, 21:37
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: Less than 1 Millisecond Timing
Oh, all gets different if you use Ndless. The C/C++ languages don't work as Lua: in Lua you have a timer that updates every x seconds, and in C/C++ you have no timer, just a loop; so, it is way faster and you even sometimes have to slow it down
Dernière édition par pierrotdu18 le 31 Mai 2015, 22:04, édité 1 fois.
Bonjour
-
pierrotdu18Premium
Niveau 15: CC (Chevalier des Calculatrices)- Messages: 975
- Inscription: 07 Nov 2013, 20:18
- Localisation: Paris V
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: MP* Lycée Henri IV
Re: Less than 1 Millisecond Timing
Darn, thanks for the help anyways.
-
Brindlefly
Niveau 2: MI2 (Membre Initié)- Messages: 3
- Inscription: 31 Mai 2015, 21:37
- Genre:
- Calculatrice(s):→ MyCalcs profile
5 messages
• Page 1 sur 1
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 11 invités