View unanswered posts | View active topics It is currently Thu Oct 02, 2014 8:31 am






Reply to topic  [ 2 posts ] 
time variables in RobotC 
Author Message
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post time variables in RobotC
hey,
not to hijack the other thread about encoder time monitoring I opened a new topic:

MHTS wrote:
Direct cut and paste from RobotC help:
Code:
nPgmTime const long nPgmTime 
(long) This variable contains the value of the lower 16-bits of the internal 1-msec clock. This variable is reset when user program first starts running. This clock does not increment when the program is in a debugger "suspended" state which is useful during single step debugging as the clock does not increment. 
int varPgmTime;         // creates a variable
varPgmTime = nPgmTime;  // stores the current value of nPgmTime to a variable

nSysTime const long nSysTime 
(long) This variable contains the value of the lower 16-bits of the internal 1-msec clock. This variable is reset when NXT is first powered on. 
int varSysTime;         // creates a variable
varSysTime = nSysTime;  // stores the current value of nSysTime to a variable
 


thank you!
for both variables it's been written:
"This variable contains the value of the lower 16-bits "

what is the variable name of the whole unsigned long time (32 bit)?
(e.g., I once had to run a program for >1 week and had to monitor the time)

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Wed Jan 08, 2014 5:52 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: time variables in RobotC
I have answered your question in the other thread.
viewtopic.php?f=1&t=7559&start=30

I think the documentation is wrong. The time stamp is really 32-bit.


Wed Jan 08, 2014 6:08 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: jpalnick and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.