This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Clocks


Hi all

I'm trying to make a simple timer but it doesn't seem to work. The time 
doesn't change and therefore my final print statement is always prints 
All operations completed in 0 seconds.

This is entirely from the simpletimer example which works on my system leaving 
me very confused...

Any ideas what I'm leaving out?
Wayne


system_clockH = cyg_real_time_clock();
cyg_clock_to_counter(system_clockH,&test_counterH);
count = cyg_current_time;
printf("Starting sampling at %llu\n", count);
cyg_thread_delay(300);
printf("All operations completed in %llu seconds \n" ,  
  cyg_current_time-count);

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]