Menu

#27 Timers for delayed events

open
None
5
2005-03-23
2002-06-02
No

Note: This patch includes that for Visual Bell.
The patch consists of 3 parts :
1) diffs for main source
2) timers.c
3) timers.h

One of the problems with implementing the visual bell
was that the code required to remove the bell needed
adding to the core of the nettle source and could not
be used in an abstracted form. This timers patch
allows timed events to be used per-session without
impacting on the main source and thus making
maintenance a little simpler.

Timers can be added and removed as you would expect.
They can be set to be single shot, or recurring. They
are associated with a session and can be destroyed by
session handle (in order to allow simple session tidy
up).

With this patch, the timing of blinking text,
blinking cursor and the visual bell are all delegated
to the timer routines. This means that the interface
for manipulating them is simpler, but has some side
effects :
a) Blinking text is unsynchronised with that in
other windows.
b) Blinking cursor and blinking text are
unsynchronised.

By abstracting the timer routines, there is a simpler
interface and more flexibility for timed events,
whether they are for scripts, protocols or some other
unforeseen use.

Whilst this patch contains the visual bell patch, it
could be regenerated without the visual bell (or
without any of the other components).

The timers.[ch] files are independant and require no
part Nettle to function; if you want to use 'em in
your own projects or what have you, they're available.

A few more notes are includes within the diffs file.

Discussion

  • Justin Fletcher

    Justin Fletcher - 2002-06-02

    Logged In: YES
    user_id=222505

    Something's playing silly buggers; whether it's Oregano or
    SourceForge, I've no idea, but I can't attach anything (and
    it's worked in the past!).

    Changes can be found at :

    http://homepage.ntlworld.com/justin.fletcher/timers_and_visu
    albell.zip

     
  • Alex Macfarlane Smith

    Logged In: YES
    user_id=221792

    Attempting to attach Gerph's patch to this page.

     
  • Alex Macfarlane Smith

    Gerph's patch for timers and visual bell

     
  • Ian Jeffray

    Ian Jeffray - 2005-03-23
    • assigned_to: nobody --> ijeffray
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.