comp.lang.ada
 help / color / mirror / Atom feed
* Sound and time
@ 2004-12-05 17:13 maxsio ;D
  2004-12-05 19:11 ` tmoran
  0 siblings, 1 reply; 2+ messages in thread
From: maxsio ;D @ 2004-12-05 17:13 UTC (permalink / raw)


Hi. Last time I started learning programming in Ada and now I've to write 
some program, but i've got problem. I'd be brateful if you could help me. 
First of all, I don't know how to generate sound useing speker inside PC. I 
heard something about command sound, but I don't know which packages I need 
to use. Secondly, I don't know how to clear my screan, I mean how to delete 
everything (text) from console. And the last problem which I have is problem 
with measuring time. I want to measure time from last pressed key by user 
and if is higher then 1000ms program will do something. Thanks for help and 
sorry for my poor English.

Greatings maxsio
-- 
maxsio@wp.pl
GG: 1447475
IRC: irc.efnet.pl #osiolek
Motto: W zyciu chodzi o to, by byc troche niemozliwym.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Sound and time
  2004-12-05 17:13 Sound and time maxsio ;D
@ 2004-12-05 19:11 ` tmoran
  0 siblings, 0 replies; 2+ messages in thread
From: tmoran @ 2004-12-05 19:11 UTC (permalink / raw)


>First of all, I don't know how to generate sound useing speker inside PC. I
>heard something about command sound, but I don't know which packages I need
>to use. Secondly, I don't know how to clear my screan, I mean how to delete
>everything (text) from console. And the last problem which I have is problem
>with measuring time. I want to measure time from last pressed key by user
>and if is higher then 1000ms program will do something. Thanks for help and
  Measuring time is easy, function Ada.Calendar.Clock returns the current
time so
  Start_Time := Ada.Calendar.Clock;
  Wait_For_User_Action;
  Stop_Time := Ada.Calendar.Clock;
  Elapsed_Duration := Stop_Time - Start_Time;
  if Elapsed_Duration > 1.0 then Do_Something;end if;
will do the job.  Everything else involves an OS call or IO operations
and thus differs depending on what OS you are using.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-05 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-05 17:13 Sound and time maxsio ;D
2004-12-05 19:11 ` tmoran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox