summaryrefslogtreecommitdiff
path: root/src/timer
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2002-02-11 18:11:16 +0000
committerJaroslav Kysela <perex@perex.cz>2002-02-11 18:11:16 +0000
commit2ca5ace9cb737bc301b0a19bad4cd80549a1702e (patch)
tree8bc4e328f15fb48b8a3434f566729ce511b1b8ca /src/timer
parent56fac8ab149b8e973c850ddaf60d55effd0536df (diff)
downloadalsa-lib-2ca5ace9cb737bc301b0a19bad4cd80549a1702e.tar.gz
More documentation changes (rawmidi, timer)
Diffstat (limited to 'src/timer')
-rw-r--r--src/timer/timer.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/timer/timer.c b/src/timer/timer.c
index c83c7a3c..1996b5b3 100644
--- a/src/timer/timer.c
+++ b/src/timer/timer.c
@@ -5,6 +5,7 @@
* \date 1998-2001
*
* Timer Interface is designed to access timers.
+ * See \ref timer page for more details.
*/
/*
* Timer Interface - main file
@@ -27,6 +28,45 @@
*
*/
+/*! \page timer Timer interface
+
+<P> Timer interface is designed to use internal timers in sound hardware, but
+it can be driven with any timer.
+
+\section timer_general_overview General overview
+
+The timer implementation uses ring buffer to store information about timing
+events. In this buffer is recorded count of ticks and current tick resolution
+in nanoseconds.
+
+\section timer_open Opening
+
+Timer devices can be opened in two ways. When #SND_TIMER_OPEN_NONBLOCK flag
+is used, then the open functions return immediately with -EBUSY error code when
+resources are occupied with another application. When #SND_TIMER_OPEN_NONBLOCK
+is not used (by default) the open functions block the application requesting
+device until resources are not free.
+
+\section timer_events Events
+
+Events are read via snd_timer_read() function.
+
+\section timer_examples Examples
+
+The full featured examples with cross-links:
+
+\par Simple timer test program
+\ref example_test_timer "example code"
+\par
+This example shows opening a timer device and reading of timer events.
+
+*/
+
+/**
+ * \example ../test/timer.c
+ * \anchor example_test_timer
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>