This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
clock stops during cyg_scheduler_lock()?
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] clock stops during cyg_scheduler_lock()?
- From: "David Geng" <deli dot geng at ncl dot ac dot uk>
- Date: Wed, 29 Nov 2000 19:29:22 -0000
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/
//