Re: Task Management
- From: Stephen Leake <stephen_leake@xxxxxxx>
- Date: Wed, 28 Dec 2005 07:33:05 -0500
"The One Who Rages" <Krzysztof.Daniel@xxxxxxxxx> writes:
> Hello
>
> I am new to ada.
> I am trying to develop a simple system for managing
> different(predefined) tasks.
> I need to know time consumption for each task(f.e task with id 1 used
> 213 ms of processor). Could anyone point me vision of solution?
> I can estimate of course, but it is not sattisfactying me.
>
> I work under winXP, with gnat compiler.
Using standard Ada, you can measure "wall clock time" for each task,
with Ada.Calendar. In each task, store the start and end time, by
calling Ada.Calendar.Clock.
But if the tasks interrupt each other, this is _not_ the per-task CPU
usage.
There is probably a Win32 API for this. Go to
http://msdn.microsoft.com/library, and search around. When you find
it, see if it is already imported in the GNAT Win32 bindings. Then see
if you can make it work :).
--
-- Stephe
.
- References:
- Task Management
- From: The One Who Rages
- Task Management
- Prev by Date: Re: linking problem in DPAPI
- Next by Date: Re: Task Management
- Previous by thread: Re: Task Management
- Next by thread: Re: Task Management
- Index(es):
Relevant Pages
|