Subject:
|
Re: sys_time not working
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 5 Aug 2003 19:28:18 GMT
|
Viewed:
|
3114 times
|
| |
| |
In lugnet.robotics.rcx.legos, Vasilis Papadimitriou wrote:
> Straight.c:25: `sys_time' undeclared (first use in this function)
Use get_system_up_time() instead (as modified below).
#include <conio.h>
#include <unistd.h>
#include <time.h>
#include <tm.h>
#include <dsensor.h>
#include <dmotor.h>
long int t1,t2,t;
int main(int argc, char *argv[]) {
...........
........
t1=get_system_up_time();
t=0;
t2=0;
while(t<5000){
........
}
t2=get_system_up_time();
t=t2-t1;
}
motor_a_dir(0);
motor_c_dir(0);
return 1;
}
|
|
Message has 1 Reply: | | Re: sys_time not working
|
| It works! My mistake was that i only checked the "Command Reference" link that obviously refers to a previous version of legOS. So thank you very much. See you at the Olympic Games in our city Athens . "John Hansen" <JohnBinder@aol.com> wrote in (...) (21 years ago, 6-Aug-03, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | sys_time not working
|
| Hi i install successfully brickOS-0.2.6.10 under Win2000 without any problems and ran successfully "helloworld.lx" I created one first elementary small program using the sys_time function. The problem is that it doesn't compile correctly. The (...) (21 years ago, 5-Aug-03, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|