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]

clock stops during cyg_scheduler_lock()?


Hi, look at this program please.

 cyg_scheduler_lock();

 begin = clock();

... ...

 end = clock();

 printf("TIME:%f \n", (float)((float)(end-begin)/CLOCKS_PER_SEC));

 cyg_scheduler_unlock();

After more than 10 second. It has the output:

TIME:0.000000

However, after I put the "cyg_scheduler_unlock();" before "end = clock();",
it has:

TIME:13.000000

Is it normal?

//
//     University of Newcastle upon Tyne
//     Tel: +44 (0)191 222 6000 ext 5018
//  http://www.students.ncl.ac.uk/deli.geng/
//



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