Re: Task Management
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 13:28:16 +0100
On 28 Dec 2005 03:27:52 -0800, The One Who Rages wrote:
> I am new to ada.
You are welcome, though the following is not Ada question.
> 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.
See Win32 API procedure GetThreadTimes in MSDN. GNAT Ada tasks are most
likely mapped to Windows threads. Call GetCurrentThread once from a task to
identify it. The result is a pseudo handle. Use DuplicateHandle on it to
get another (true) handle to the thread. This one can be used outside it
(in another task.)
P.S. GNAT has Win32 bindings.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: Task Management
- From: Martin Dowie
- Re: Task Management
- References:
- Task Management
- From: The One Who Rages
- Task Management
- Prev by Date: Task Management
- Next by Date: Re: linking problem in DPAPI
- Previous by thread: Task Management
- Next by thread: Re: Task Management
- Index(es):
Relevant Pages
|