Subject:
|
Re: sys_time not working
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 6 Aug 2003 08:44:30 GMT
|
Viewed:
|
3265 times
|
| |
| |
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 message
news:HJ5vF6.13L4@lugnet.com...
> 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 is in Reply To:
| | Re: sys_time not working
|
| (...) 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[]) { ......... ........ (...) (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
|
|
|
|