Debian Codegraph @

po/da/man2/timerfd_create.2.po

raw
1 # Danish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Joe Hansen <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.29.1\n"
8 "POT-Creation-Date: 2026-06-05 06:49+0200\n"
9 "PO-Revision-Date: 2026-05-08 16:52+0100\n"
10 "Last-Translator: Joe Hansen <[email protected]>\n"
11 "Language-Team: Danish <[email protected]>\n"
12 "Language: da\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
18 #. type: TH
19 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
20 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
21 #, no-wrap
22 msgid "timerfd_create"
23 msgstr "timerfd_create"
24
25 #. type: TH
26 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
27 #, no-wrap
28 msgid "2026-02-16"
29 msgstr "16. februar 2026"
30
31 #. type: TH
32 #: archlinux debian-unstable
33 #, no-wrap
34 msgid "Linux man-pages 6.18"
35 msgstr "Linux man-pages 6.18"
36
37 #. type: SH
38 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
39 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
40 #, no-wrap
41 msgid "NAME"
42 msgstr "NAVN"
43
44 #. type: Plain text
45 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
46 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
47 msgid ""
48 "timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via "
49 "file descriptors"
50 msgstr ""
51 "timerfd_create, timerfd_settime, timerfd_gettime - stopure der påminder via "
52 "fildeskriptorer"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr "BIBLIOTEK"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "Standard C library (I<libc>,\\ I<-lc>)"
65 msgstr "C-standardbibliotek (I<libc>,\\ I<-lc>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "SYNOPSIS"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n"
79 msgstr "B<#include E<lt>sys/timerfd.hE<gt>>\n"
80
81 #. type: Plain text
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n"
86 msgstr "B<int timerfd_create(int >I<clockid>B<, int >I<flag>B<);>\n"
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, no-wrap
92 msgid ""
93 "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n"
94 "B< const struct itimerspec *>I<new_value>B<,>\n"
95 "B< struct itimerspec *_Nullable >I<old_value>B<);>\n"
96 "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n"
97 msgstr ""
98 "B<int timerfd_settime(int >I<fd>B<, int >I<flag>B<,>\n"
99 "B< const struct itimerspec *>I<ny_værdi>B<,>\n"
100 "B< struct itimerspec *_Nullable >I<gl_værdi>B<);>\n"
101 "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<nuv_værdi>B<);>\n"
102
103 #. type: SH
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 #, no-wrap
107 msgid "DESCRIPTION"
108 msgstr "BESKRIVELSE"
109
110 #. type: Plain text
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 msgid ""
114 "These system calls create and operate on a timer that delivers timer "
115 "expiration notifications via a file descriptor. They provide an alternative "
116 "to the use of B<setitimer>(2) or B<timer_create>(2), with the advantage "
117 "that the file descriptor may be monitored by B<select>(2), B<poll>(2), and "
118 "B<epoll>(7)."
119 msgstr ""
120 "Disse systemkald opretter og fungerer på et stopur, der leverer påmindelser "
121 "om udløb for stopure via en fildeskriptor. De tilbyder et alternativ til "
122 "brugen af B<setitimer>(2) eller B<timer_create>(2), med den fordel at "
123 "fildeskriptoren kan overvåges af B<select>(2), B<poll>(2) og B<epoll>(7)."
124
125 #. type: Plain text
126 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
127 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
128 msgid ""
129 "The use of these three system calls is analogous to the use of "
130 "B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2). (There is "
131 "no analog of B<timer_getoverrun>(2), since that functionality is provided by "
132 "B<read>(2), as described below.)"
133 msgstr ""
134 "Brugen af disse tre systemkald er analog til brugen af B<timer_create>(2), "
135 "B<timer_settime>(2) og B<timer_gettime>(2). (Der er ingen analog for "
136 "B<timer_getoverrun>(2) da den funktionalitet tilbydes af B<read>(2), som "
137 "beskrevet nedenfor)."
138
139 #. type: SS
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 #, no-wrap
143 msgid "timerfd_create()"
144 msgstr "timerfd_create()"
145
146 #. type: Plain text
147 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
148 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
149 msgid ""
150 "B<timerfd_create>() creates a new timer object, and returns a file "
151 "descriptor that refers to that timer. The I<clockid> argument specifies the "
152 "clock that is used to mark the progress of the timer, and must be one of the "
153 "following:"
154 msgstr ""
155 "B<timerfd_create>() opretter et nyt stopurobjekt og returnerer en "
156 "fildeskriptor, der referer til det stopur. Argumentet I<clockid> angiver "
157 "uret, der bruges til at markere status for stopuret, og skal være en af de "
158 "følgende:"
159
160 #. type: TP
161 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
162 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
163 #, no-wrap
164 msgid "B<CLOCK_REALTIME>"
165 msgstr "B<CLOCK_REALTIME>"
166
167 #. type: Plain text
168 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
169 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
170 msgid "A settable system-wide real-time clock."
171 msgstr "Et realtids ur, der kan angives for hele systemet."
172
173 #. type: TP
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 #, no-wrap
177 msgid "B<CLOCK_MONOTONIC>"
178 msgstr "B<CLOCK_MONOTONIC>"
179
180 #. type: Plain text
181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
183 msgid ""
184 "A nonsettable monotonically increasing clock that measures time from some "
185 "unspecified point in the past that does not change after system startup."
186 msgstr ""
187 "Et monotont stigende ur, der ikke kan indstilles og som måler tid fra et "
188 "uangivet punkt i fortiden, der ikke ændrer sig efter systemets "
189 "opstartstidspunkt."
190
191 #. type: TP
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 #, no-wrap
195 msgid "B<CLOCK_BOOTTIME> (Since Linux 3.15)"
196 msgstr "B<CLOCK_BOOTTIME> (siden Linux 3.15)"
197
198 #. commit 4a2378a943f09907fb1ae35c15de917f60289c14
199 #. type: Plain text
200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
202 msgid ""
203 "Like B<CLOCK_MONOTONIC>, this is a monotonically increasing clock. However, "
204 "whereas the B<CLOCK_MONOTONIC> clock does not measure the time while a "
205 "system is suspended, the B<CLOCK_BOOTTIME> clock does include the time "
206 "during which the system is suspended. This is useful for applications that "
207 "need to be suspend-aware. B<CLOCK_REALTIME> is not suitable for such "
208 "applications, since that clock is affected by discontinuous changes to the "
209 "system clock."
210 msgstr ""
211 "Som B<CLOCK_MONOTONIC>, er dette et monotont stigende ur. Hvor "
212 "B<CLOCK_MONOTONIC> ikke måler tiden mens et system er i dvale, så inkluderer "
213 "B<CLOCK_BOOTTIME> tiden hvor systemet er i dvale. Dette er nyttigt for "
214 "programmer, der skal være dvale-opmærksomme. B<CLOCK_REALTIME> er ikke egnet "
215 "for sådanne programmer, da uret påvirkes af diskontinuerlige ændringer til "
216 "systemuret."
217
218 #. type: TP
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, no-wrap
222 msgid "B<CLOCK_REALTIME_ALARM> (since Linux 3.11)"
223 msgstr "B<CLOCK_REALTIME_ALARM> (siden Linux 3.11)"
224
225 #. commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
226 #. type: Plain text
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 msgid ""
230 "This clock is like B<CLOCK_REALTIME>, but will wake the system if it is "
231 "suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order "
232 "to set a timer against this clock."
233 msgstr ""
234 "Dette ur er som B<CLOCK_REALTIME>, men vil vække systemet, hvis det er i "
235 "dvale. Kalderen skal have funktionaliteten B<CAP_WAKE_ALARM> for at angive "
236 "et stopur mod dette ur."
237
238 #. type: TP
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 #, no-wrap
242 msgid "B<CLOCK_BOOTTIME_ALARM> (since Linux 3.11)"
243 msgstr "B<CLOCK_BOOTTIME_ALARM> (siden Linux 3.11)"
244
245 #. commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8
246 #. type: Plain text
247 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
248 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
249 msgid ""
250 "This clock is like B<CLOCK_BOOTTIME>, but will wake the system if it is "
251 "suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order "
252 "to set a timer against this clock."
253 msgstr ""
254 "Dette ur er som B<CLOCK_BOOTTIME>, men vil vække systemet, hvis det er i "
255 "dvale. Kalderen skal have funktionaliteten B<CAP_WAKE_ALARM> for at kunne "
256 "angive et stopur mod dette ur."
257
258 #. type: Plain text
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 msgid "See B<clock_getres>(2) for some further details on the above clocks."
262 msgstr "Se B<clock_getres>(2) for yderligere detaljer om ovenstående ure."
263
264 #. type: Plain text
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 msgid ""
268 "The current value of each of these clocks can be retrieved using "
269 "B<clock_gettime>(2)."
270 msgstr ""
271 "Den nuværende værdi af hver af disse ure kan indhentes via "
272 "B<clock_gettime>(2)."
273
274 #. type: Plain text
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 msgid ""
278 "Starting with Linux 2.6.27, the following values may be bitwise ORed in "
279 "I<flags> to change the behavior of B<timerfd_create>():"
280 msgstr ""
281 "Startende med Linux 2.6.27 kan de følgende værdier blive bit-vis ORed i "
282 "I<flag> for at ændre opførelsen for B<timerfd_create>():"
283
284 #. type: TP
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 #, no-wrap
288 msgid "B<TFD_NONBLOCK>"
289 msgstr "B<TFD_NONBLOCK>"
290
291 #. type: Plain text
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 msgid ""
295 "Set the B<O_NONBLOCK> file status flag on the open file description (see "
296 "B<open>(2)) referred to by the new file descriptor. Using this flag saves "
297 "extra calls to B<fcntl>(2) to achieve the same result."
298 msgstr ""
299 "Angiv filstatusflaget B<O_NONBLOCK> på den åbne filbeskrivelse (se "
300 "B<open>(2)) refereret til af den nye fildeskriptor. Brug af dette flag "
301 "forhindrer ekstra kald til B<fcntl>(2) for at opnå det samme resultat."
302
303 #. type: TP
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 #, no-wrap
307 msgid "B<TFD_CLOEXEC>"
308 msgstr "B<TFD_CLOEXEC>"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 msgid ""
314 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
315 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
316 "may be useful."
317 msgstr ""
318 "Angiv flaget close-on-exec (B<FD_CLOEXEC>) på den nye fildeskriptor. Se "
319 "beskrivelsen af flaget B<O_CLOEXEC> i B<open>(2) for årsagerne til hvorfor "
320 "dette kan være nyttigt."
321
322 #. type: Plain text
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 msgid ""
326 "In Linux versions up to and including 2.6.26, I<flags> must be specified as "
327 "zero."
328 msgstr ""
329 "I Linuxversioner op til og inklusive 2.6.26 skal I<flag> være angivet som "
330 "nul."
331
332 #. type: SS
333 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
334 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
335 #, no-wrap
336 msgid "timerfd_settime()"
337 msgstr "timerfd_settime()"
338
339 #. type: Plain text
340 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
341 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
342 msgid ""
343 "B<timerfd_settime>() arms (starts) or disarms (stops) the timer referred "
344 "to by the file descriptor I<fd>."
345 msgstr ""
346 "B<timerfd_settime>() bevæbner (starter) eller afvæbner (stopper) stopuret "
347 "refereret til af fildeskriptoren I<fd>."
348
349 #. type: Plain text
350 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
351 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
352 msgid ""
353 "The I<new_value> argument specifies the initial expiration and interval for "
354 "the timer. The I<itimerspec> structure used for this argument is described "
355 "in B<itimerspec>(3type)."
356 msgstr ""
357 "Arguementet I<ny_værdi> angiver det oprindelige udløb og interval for "
358 "stopuret. Strukturen I<itimerspec> brugt for dette argument er beskrevet i "
359 "B<itimerspec>(3type)."
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid ""
365 "I<new_value.it_value> specifies the initial expiration of the timer, in "
366 "seconds and nanoseconds. Setting either field of I<new_value.it_value> to a "
367 "nonzero value arms the timer. Setting both fields of I<new_value.it_value> "
368 "to zero disarms the timer."
369 msgstr ""
370 "I<new_value.it_value> angiver det oprindelige udløb for stopuret, i sekunder "
371 "og nanosekunder. Angivelse af et af felterne i I<new_value.it_value> til en "
372 "værdi anderledes end nul bevæbner stopuret. Angivelse af begge felter i "
373 "I<new_value.it_value> til nul afvæbner stopuret."
374
375 #. type: Plain text
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 msgid ""
379 "Setting one or both fields of I<new_value.it_interval> to nonzero values "
380 "specifies the period, in seconds and nanoseconds, for repeated timer "
381 "expirations after the initial expiration. If both fields of "
382 "I<new_value.it_interval> are zero, the timer expires just once, at the time "
383 "specified by I<new_value.it_value>."
384 msgstr ""
385 "Angivelse af et eller begge felter i I<new_value.it_interval> til værdier "
386 "forskellige fra nul angiver perioden, i sekunder og nanosekunder, for "
387 "gentagne stopursudløb efter det oprindelige udløb. Hvis begge felter i "
388 "I<new_value.it_interval> er nul, så udløber stopuret bare en gang, på "
389 "tidspunktet angivet af I<new_value.it_value>."
390
391 #. type: Plain text
392 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
393 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
394 msgid ""
395 "By default, the initial expiration time specified in I<new_value> is "
396 "interpreted relative to the current time on the timer's clock at the time of "
397 "the call (i.e., I<new_value.it_value> specifies a time relative to the "
398 "current value of the clock specified by I<clockid>). An absolute timeout "
399 "can be selected via the I<flags> argument."
400 msgstr ""
401 "Som standard fortolkes den oprindelige udløbstid angivet i I<ny_værdi> "
402 "relativ til den nuværende tid på stopurets ur på tidspunktet for kaldet "
403 "(dvs. I<new_value.it_value> angiver en tid relativ til den nuværende værdi "
404 "for uret angivet af I<clockid>). Et absolut tidsudløb kan vælges via "
405 "argumentet I<flag>."
406
407 #. type: Plain text
408 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
409 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
410 msgid ""
411 "The I<flags> argument is a bit mask that can include the following values:"
412 msgstr ""
413 "Argumentet I<flag> er en bit-maske, der kan inkludere de følgende værdier:"
414
415 #. type: TP
416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
418 #, no-wrap
419 msgid "B<TFD_TIMER_ABSTIME>"
420 msgstr "B<TFD_TIMER_ABSTIME>"
421
422 #. type: Plain text
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 msgid ""
426 "Interpret I<new_value.it_value> as an absolute value on the timer's clock. "
427 "The timer will expire when the value of the timer's clock reaches the value "
428 "specified in I<new_value.it_value>."
429 msgstr ""
430 "Fortolk I<new_value.it_value> som en absolut værdi på stopurets ur. Stopuret "
431 "vil udløbe når værdien af stopurets ur når værdien angivet i "
432 "I<new_value.it_value>."
433
434 #. type: TP
435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
437 #, no-wrap
438 msgid "B<TFD_TIMER_CANCEL_ON_SET>"
439 msgstr "B<TFD_TIMER_CANCEL_ON_SET>"
440
441 #. type: Plain text
442 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
443 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
444 msgid ""
445 "If this flag is specified along with B<TFD_TIMER_ABSTIME> and the clock for "
446 "this timer is B<CLOCK_REALTIME> or B<CLOCK_REALTIME_ALARM>, then mark this "
447 "timer as cancelable if the real-time clock undergoes a discontinuous change "
448 "(B<settimeofday>(2), B<clock_settime>(2), or similar). When such changes "
449 "occur, a current or future B<read>(2) from the file descriptor will fail "
450 "with the error B<ECANCELED>."
451 msgstr ""
452 "Hvis dette flag er angivet med B<TFD_TIMER_ABSTIME> og uret for dette stopur "
453 "er B<CLOCK_REALTIME> eller B<CLOCK_REALTIME_ALARM>, så marker dette stopur "
454 "som om det kan afbestilles hvis realtidsuret har en diskontinuerlig ændring "
455 "(B<settimeofday>(2), B<clock_settime>(2) eller lignende). Når sådanne "
456 "ændringer opstår vil en nuværende eller fremtidig B<read>(2) fra "
457 "fildeskriptoren fejle med fejlbeskeden B<ECANCELED>."
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
461 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
462 msgid ""
463 "If the I<old_value> argument is not NULL, then the I<itimerspec> structure "
464 "that it points to is used to return the setting of the timer that was "
465 "current at the time of the call; see the description of "
466 "B<timerfd_gettime>() following."
467 msgstr ""
468 "Hvis argumentet I<gl_værdi> ikke er NULL, så bruges strukturen I<itimerspec> "
469 "der peges på til at returnere indstillingen for stopuret, der var gyldig på "
470 "tidspunktet for kaldet; se beskrivelsen af B<timerfd_gettime>() der følger."
471
472 #. type: SS
473 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
474 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
475 #, no-wrap
476 msgid "timerfd_gettime()"
477 msgstr "timerfd_gettime()"
478
479 #. type: Plain text
480 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
481 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
482 msgid ""
483 "B<timerfd_gettime>() returns, in I<curr_value>, an I<itimerspec> structure "
484 "that contains the current setting of the timer referred to by the file "
485 "descriptor I<fd>."
486 msgstr ""
487 "B<timerfd_gettime>() returnerer, i I<nuv_værdi>, en I<itimerspec>-struktur "
488 "der indheolder den nuværende indstilling for stopuret refereret til af "
489 "fildeskriptoren I<fd>."
490
491 #. type: Plain text
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 msgid ""
495 "The I<it_value> field returns the amount of time until the timer will next "
496 "expire. If both fields of this structure are zero, then the timer is "
497 "currently disarmed. This field always contains a relative value, regardless "
498 "of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the "
499 "timer."
500 msgstr ""
501 "Feltet I<it_value> returnerer tidsintervallet indtil stopuret næste gang "
502 "udløber. Hvis begge felter for denne struktur er nul, så er stopuret "
503 "afvæbnet. Dette felt indeholder en relativ værdi, uanset om flaget "
504 "B<TFD_TIMER_ABSTIME> var angivet da stopuret blev indstillet."
505
506 #. type: Plain text
507 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
508 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
509 msgid ""
510 "The I<it_interval> field returns the interval of the timer. If both fields "
511 "of this structure are zero, then the timer is set to expire just once, at "
512 "the time specified by I<curr_value.it_value>."
513 msgstr ""
514 "Feltet I<it_interval> returnerer intervallet for stopuret. Hvis begge felter "
515 "for denne struktur er nul, så er stopuret sat til at udløb bare en gang, på "
516 "tidspunktet angivet af I<curr_value.it_value>."
517
518 #. type: SS
519 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
520 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
521 #, no-wrap
522 msgid "Operating on a timer file descriptor"
523 msgstr "Operationer på et stopurs fildeskriptor"
524
525 #. type: Plain text
526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
528 msgid ""
529 "The file descriptor returned by B<timerfd_create>() supports the following "
530 "additional operations:"
531 msgstr ""
532 "Fildeskriptoren returneres af B<timerfd_create>() understøtter de følgende "
533 "yderligere operationer:"
534
535 #. type: TP
536 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
537 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
538 #, no-wrap
539 msgid "B<read>(2)"
540 msgstr "B<read>(2)"
541
542 #. type: Plain text
543 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
544 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
545 msgid ""
546 "If the timer has already expired one or more times since its settings were "
547 "last modified using B<timerfd_settime>(), or since the last successful "
548 "B<read>(2), then the buffer given to B<read>(2) returns an unsigned 8-byte "
549 "integer (I<uint64_t>) containing the number of expirations that have "
550 "occurred. (The returned value is in host byte order\\[em]that is, the "
551 "native byte order for integers on the host machine.)"
552 msgstr ""
553 "Hvis stopuret allerede er udløbet en eller flere gange siden dets "
554 "indstillinger sidst blev ændret via B<timerfd_settime>(), eller siden den "
555 "sidste succesfulde B<read>(2), så returnerer mellemlageret angivet til "
556 "B<read>(2) et ej underskrevet 8-byte heltal (I<uint64_t>) indeholdende "
557 "antallet af udløb, der er opstået. (Den returnerede værdi er i vært-"
558 "byterækkefølge\\[em]det vil sige, byte-standardrækkefølgen for heltal på "
559 "værtsmaskinen)."
560
561 #. type: Plain text
562 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
563 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
564 msgid ""
565 "If no timer expirations have occurred at the time of the B<read>(2), then "
566 "the call either blocks until the next timer expiration, or fails with the "
567 "error B<EAGAIN> if the file descriptor has been made nonblocking (via the "
568 "use of the B<fcntl>(2) B<F_SETFL> operation to set the B<O_NONBLOCK> flag)."
569 msgstr ""
570 "Hvis intet stopurudløb er sket på tidspunktet for B<read>(2), så blokerer "
571 "kaldet enten det næste stopursudløb eller fejler med den følgende fejlbesked "
572 "B<EAGAIN> hvis fildeskriptoren er gjort ikkeblokerende (via brugen af "
573 "B<fcntl>(2) B<F_SETFL>-operationen til at angive flaget B<O_NONBLOCK>)."
574
575 #. type: Plain text
576 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
577 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
578 msgid ""
579 "A B<read>(2) fails with the error B<EINVAL> if the size of the supplied "
580 "buffer is less than 8 bytes."
581 msgstr ""
582 "En B<read>(2) fejler med fejlbeskeden B<EINVAL> hvis størrelsen for det "
583 "angivne mellemlager er mindre end 8 byte."
584
585 #. type: Plain text
586 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
587 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
588 msgid ""
589 "If the associated clock is either B<CLOCK_REALTIME> or "
590 "B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), and "
591 "the flag B<TFD_TIMER_CANCEL_ON_SET> was specified when calling "
592 "B<timerfd_settime>(), then B<read>(2) fails with the error B<ECANCELED> if "
593 "the real-time clock undergoes a discontinuous change. (This allows the "
594 "reading application to discover such discontinuous changes to the clock.)"
595 msgstr ""
596 "Hvis det associerede ur er enten B<CLOCK_REALTIME> eller "
597 "B<CLOCK_REALTIME_ALARM>, er stopuret absolut (B<TFD_TIMER_ABSTIME>) og "
598 "flaget B<TFD_TIMER_CANCEL_ON_SET> var angivet da B<timerfd_settime>() blev "
599 "kaldet, så fejler B<read>(2) med fejlbeskeden B<ECANCELED> hvis realtidsuret "
600 "har en diskontinuerlig ændring. (Dette gør det muligt for det læsende "
601 "program at registrere sådanne diskontinuerlige ændringer til uret)."
602
603 #. type: Plain text
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 msgid ""
607 "If the associated clock is either B<CLOCK_REALTIME> or "
608 "B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), and "
609 "the flag B<TFD_TIMER_CANCEL_ON_SET> was I<not> specified when calling "
610 "B<timerfd_settime>(), then a discontinuous negative change to the clock "
611 "(e.g., B<clock_settime>(2)) may cause B<read>(2) to unblock, but return a "
612 "value of 0 (i.e., no bytes read), if the clock change occurs after the time "
613 "expired, but before the B<read>(2) on the file descriptor."
614 msgstr ""
615 "Hvis det associerede ur er enten B<CLOCK_REALTIME> eller "
616 "B<CLOCK_REALTIME_ALARM>, er stopuret absolut (B<TFD_TIMER_ABSTIME>) og "
617 "flaget B<TFD_TIMER_CANCEL_ON_SET> I<ikke> var angivet da "
618 "B<timerfd_settime>() blev kaldt, så kan en diskontinuerlig negativ ændring "
619 "til uret (f.eks. B<clock_settime>(2)) få B<read>(2) til at fjerne blokering, "
620 "men returnere en værdi på 0 (dvs. ingen byte læst), hvis ur-ændringen opstår "
621 "efter tiden udløb, men før B<read>(2) på fildeskriptoren."
622
623 #. type: TP
624 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
625 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
626 #, no-wrap
627 msgid "B<poll>(2)"
628 msgstr "B<poll>(2)"
629
630 #. type: TQ
631 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
632 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
633 #, no-wrap
634 msgid "B<select>(2)"
635 msgstr "B<select>(2)"
636
637 #. type: TQ
638 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
639 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
640 #, no-wrap
641 msgid "(and similar)"
642 msgstr "(og lignende)"
643
644 #. type: Plain text
645 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
646 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
647 msgid ""
648 "The file descriptor is readable (the B<select>(2) I<readfds> argument; the "
649 "B<poll>(2) B<POLLIN> flag) if one or more timer expirations have occurred."
650 msgstr ""
651 "Fildeskriptoren kan læses (argumentet B<select>(2) I<readfds>; flaget "
652 "B<poll>(2) B<POLLIN>) hvis en ellere flere stopursudløb er opstået."
653
654 #. type: Plain text
655 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
656 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
657 msgid ""
658 "The file descriptor also supports the other file-descriptor multiplexing "
659 "APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)."
660 msgstr ""
661 "Fildeskriptoren understøtter også de andre fil-deskriptor multiplexing-"
662 "API'er: B<pselect>(2), B<ppoll>(2) og B<epoll>(7)."
663
664 #. type: TP
665 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
666 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
667 #, no-wrap
668 msgid "B<ioctl>(2)"
669 msgstr "B<ioctl>(2)"
670
671 #. type: Plain text
672 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
673 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
674 msgid "The following timerfd-specific command is supported:"
675 msgstr "Den følgende timerfd-specifikke kommando er understøttet:"
676
677 #. type: TP
678 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
679 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
680 #, no-wrap
681 msgid "B<TFD_IOC_SET_TICKS> (since Linux 3.17)"
682 msgstr "B<TFD_IOC_SET_TICKS> (siden Linux 3.17)"
683
684 #. commit 5442e9fbd7c23172a1c9bc736629cd123a9923f0
685 #. type: Plain text
686 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
687 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
688 msgid ""
689 "Adjust the number of timer expirations that have occurred. The argument is "
690 "a pointer to a nonzero 8-byte integer (I<uint64_t>*) containing the new "
691 "number of expirations. Once the number is set, any waiter on the timer is "
692 "woken up. The only purpose of this command is to restore the expirations "
693 "for the purpose of checkpoint/restore. This operation is available only if "
694 "the kernel was configured with the B<CONFIG_CHECKPOINT_RESTORE> option."
695 msgstr ""
696 "Juster antallet af stopursudløb der er opstået. Argumentet er en peger til "
697 "et 8-byte heltal forskellige fra nul (I<uint64_t>*) indeholdende det nye "
698 "antal udløb. Når antallet er angivet, vil en eventuel tjener på stopuret "
699 "blive vækket. Det eneste formål med denne kommando er at gendanne udløbene "
700 "til tjekpunkt/gendannelse. Denne operation er kun tilgængelig hvis kernen "
701 "blev konfigureret med tilvalget B<CONFIG_CHECKPOINT_RESTORE>."
702
703 #. type: TP
704 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
705 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
706 #, no-wrap
707 msgid "B<close>(2)"
708 msgstr "B<close>(2)"
709
710 #. type: Plain text
711 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
712 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
713 msgid ""
714 "When the file descriptor is no longer required it should be closed. When "
715 "all file descriptors associated with the same timer object have been closed, "
716 "the timer is disarmed and its resources are freed by the kernel."
717 msgstr ""
718 "Når fildeskriptoren ikke længere er krævet, så bør den lukkes. Når alle "
719 "fildeskriptorer associeret med det samme stopursobjekt er blevet lukket, så "
720 "afvæbnes stopuret og dets ressurcer frigives af kernen."
721
722 #. type: SS
723 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
724 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
725 #, no-wrap
726 msgid "fork(2) semantics"
727 msgstr "fork(2)-semantik"
728
729 #. type: Plain text
730 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
731 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
732 msgid ""
733 "After a B<fork>(2), the child inherits a copy of the file descriptor created "
734 "by B<timerfd_create>(). The file descriptor refers to the same underlying "
735 "timer object as the corresponding file descriptor in the parent, and "
736 "B<read>(2)s in the child will return information about expirations of the "
737 "timer."
738 msgstr ""
739 "Efter en B<fork>(2) arver underprocessen en kopi af fildeskriptoren oprettet "
740 "af B<timerfd_create>(). Fildeskriptoren refererer til det samme "
741 "underliggende stopursobjekt som den tilsvarende fildeskriptor i "
742 "overprocessen, og B<read>(2)'er i underprocessen vil returnere information "
743 "om udløb for stopuret."
744
745 #. type: SS
746 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
747 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
748 #, no-wrap
749 msgid "execve(2) semantics"
750 msgstr "execve(2)-semantik"
751
752 #. type: Plain text
753 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
754 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
755 msgid ""
756 "A file descriptor created by B<timerfd_create>() is preserved across "
757 "B<execve>(2), and continues to generate timer expirations if the timer was "
758 "armed."
759 msgstr ""
760 "En fildeskriptor oprettet af B<timerfd_create>() bevares på tværs af "
761 "B<execve>(2), og fortsætter med at oprette stopursudløb hvis stopuret var "
762 "bevæbnet."
763
764 #. type: SH
765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
767 #, no-wrap
768 msgid "RETURN VALUE"
769 msgstr "RETURVÆRDI"
770
771 #. type: Plain text
772 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
773 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
774 msgid ""
775 "On success, B<timerfd_create>() returns a new file descriptor. On error, "
776 "-1 is returned and I<errno> is set to indicate the error."
777 msgstr ""
778 "Ved succes, returnerer B<timerfd_create>() en ny fildeskriptor. Ved fejl, "
779 "returneres -1 og I<errno> angives for at indikere fejlen."
780
781 #. type: Plain text
782 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
783 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
784 msgid ""
785 "B<timerfd_settime>() and B<timerfd_gettime>() return 0 on success; on "
786 "error they return -1, and set I<errno> to indicate the error."
787 msgstr ""
788 "B<timerfd_settime>() og B<timerfd_gettime>() returnerer 0 ved succes; ved "
789 "fejl returnerer de -1, og angiver I<errno> for at indikere fejlen."
790
791 #. type: SH
792 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
793 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
794 #, no-wrap
795 msgid "ERRORS"
796 msgstr "FEJL"
797
798 #. type: Plain text
799 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
800 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
801 msgid "B<timerfd_create>() can fail with the following errors:"
802 msgstr "B<timerfd_create>() kan fejle med de følgende fejlbeskeder:"
803
804 #. type: TP
805 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
806 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
807 #, no-wrap
808 msgid "B<EINVAL>"
809 msgstr "B<EINVAL>"
810
811 #. type: Plain text
812 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
813 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
814 msgid "The I<clockid> is not valid."
815 msgstr "I<clockid> er ikke gyldig."
816
817 #. type: Plain text
818 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
819 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
820 msgid ""
821 "I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero."
822 msgstr ""
823 "I<flag> er ugyldig; eller, i Linux 2.6.26 eller tidligere, I<flag> er "
824 "forskellig fra nul."
825
826 #. type: TP
827 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
828 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
829 #, no-wrap
830 msgid "B<EMFILE>"
831 msgstr "B<EMFILE>"
832
833 #. type: Plain text
834 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
835 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
836 msgid ""
837 "The per-process limit on the number of open file descriptors has been "
838 "reached."
839 msgstr ""
840 "Begrænsningen per proces for antallet af åbne fildeskriptorer er blevet nået."
841
842 #. type: TP
843 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
844 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
845 #, no-wrap
846 msgid "B<ENFILE>"
847 msgstr "B<ENFILE>"
848
849 #. type: Plain text
850 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
851 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
852 msgid ""
853 "The system-wide limit on the total number of open files has been reached."
854 msgstr "Systemets begrænsning på det samlede antal åbne filer er nået."
855
856 #. type: TP
857 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
858 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
859 #, no-wrap
860 msgid "B<ENODEV>"
861 msgstr "B<ENODEV>"
862
863 #. type: Plain text
864 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
865 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
866 msgid "Could not mount (internal) anonymous inode device."
867 msgstr "Kunne ikke montere (intern) anonym iknude-enhed."
868
869 #. type: TP
870 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
871 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
872 #, no-wrap
873 msgid "B<ENOMEM>"
874 msgstr "B<ENOMEM>"
875
876 #. type: Plain text
877 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
878 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
879 msgid "There was insufficient kernel memory to create the timer."
880 msgstr "Der var utilstrækkelige kernehukommelse til at oprette stopuret."
881
882 #. type: TP
883 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
884 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
885 #, no-wrap
886 msgid "B<EPERM>"
887 msgstr "B<EPERM>"
888
889 #. type: Plain text
890 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
891 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
892 msgid ""
893 "I<clockid> was B<CLOCK_REALTIME_ALARM> or B<CLOCK_BOOTTIME_ALARM> but the "
894 "caller did not have the B<CAP_WAKE_ALARM> capability."
895 msgstr ""
896 "I<clockid> var B<CLOCK_REALTIME_ALARM> eller B<CLOCK_BOOTTIME_ALARM> men "
897 "kalderen havde ikke funktionaliteten B<CAP_WAKE_ALARM>."
898
899 #. type: Plain text
900 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
901 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
902 msgid ""
903 "B<timerfd_settime>() and B<timerfd_gettime>() can fail with the following "
904 "errors:"
905 msgstr ""
906 "B<timerfd_settime>() og B<timerfd_gettime>() kan fejle med de følgende fejl:"
907
908 #. type: TP
909 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
910 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
911 #, no-wrap
912 msgid "B<EBADF>"
913 msgstr "B<EBADF>"
914
915 #. type: Plain text
916 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
917 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
918 msgid "I<fd> is not a valid file descriptor."
919 msgstr "I<fd> er ikke en gyldig filbeskrivelse."
920
921 #. type: TP
922 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
923 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
924 #, no-wrap
925 msgid "B<EFAULT>"
926 msgstr "B<EFAULT>"
927
928 #. type: Plain text
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer."
932 msgstr "I<ny_værdi>, I<gl_værdi> eller I<nuv_værdi> er ikke en gyldig peger."
933
934 #. type: Plain text
935 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
936 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
937 msgid "I<fd> is not a valid timerfd file descriptor."
938 msgstr "I<fd> er ikke en gyldig timerfd-fildeskriptor."
939
940 #. type: Plain text
941 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
942 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
943 msgid "B<timerfd_settime>() can also fail with the following errors:"
944 msgstr "B<timerfd_settime>() kan også fejl med de følgende fejl:"
945
946 #. type: TP
947 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
948 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
949 #, no-wrap
950 msgid "B<ECANCELED>"
951 msgstr "B<ECANCELED>"
952
953 #. type: Plain text
954 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
955 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
956 msgid "See NOTES."
957 msgstr "Se NOTER."
958
959 #. type: Plain text
960 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
961 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
962 msgid ""
963 "I<new_value> is not properly initialized (one of the I<tv_nsec> falls "
964 "outside the range zero to 999,999,999)."
965 msgstr ""
966 "I<ny_værdi> er ikke korrekt initialiseret (en af I<tv_nsec> falder udenfor "
967 "intervallet nul til 999.999.999)."
968
969 #. This case only checked since Linux 2.6.29, and Linux 2.2.2[78].some-stable-version.
970 #. In older kernel versions, no check was made for invalid flags.
971 #. type: Plain text
972 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
973 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
974 msgid "I<flags> is invalid."
975 msgstr "I<flag> er ugyldig."
976
977 #. type: SH
978 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
979 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
980 #, no-wrap
981 msgid "STANDARDS"
982 msgstr "STANDARDER"
983
984 #. type: Plain text
985 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
986 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
987 msgid "Linux."
988 msgstr "Linux."
989
990 #. type: SH
991 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
992 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
993 #, no-wrap
994 msgid "HISTORY"
995 msgstr "HISTORIK"
996
997 #. type: Plain text
998 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
999 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1000 msgid "Linux 2.6.25, glibc 2.8."
1001 msgstr "Linux 2.6.25, glibc 2.8."
1002
1003 #. type: SH
1004 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1005 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1006 #, no-wrap
1007 msgid "NOTES"
1008 msgstr "NOTER"
1009
1010 #. type: Plain text
1011 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1012 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1013 msgid ""
1014 "Suppose the following scenario for B<CLOCK_REALTIME> or "
1015 "B<CLOCK_REALTIME_ALARM> timer that was created with B<timerfd_create>():"
1016 msgstr ""
1017 "Hvis vi antager det følgende scenarie for B<CLOCK_REALTIME>- eller "
1018 "B<CLOCK_REALTIME_ALARM>-stopuret, der blev oprettet med B<timerfd_create>():"
1019
1020 #. type: IP
1021 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1022 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1023 #, no-wrap
1024 msgid "(1)"
1025 msgstr "(1)"
1026
1027 #. type: Plain text
1028 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1029 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1030 msgid ""
1031 "The timer has been started (B<timerfd_settime>()) with the "
1032 "B<TFD_TIMER_ABSTIME> and B<TFD_TIMER_CANCEL_ON_SET> flags;"
1033 msgstr ""
1034 "Stopuret er blevet startet (B<timerfd_settime>()) med B<TFD_TIMER_ABSTIME>- "
1035 "og B<TFD_TIMER_CANCEL_ON_SET>-flagene;"
1036
1037 #. type: IP
1038 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1039 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1040 #, no-wrap
1041 msgid "(2)"
1042 msgstr "(2)"
1043
1044 #. type: Plain text
1045 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1046 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1047 msgid ""
1048 "A discontinuous change (e.g., B<settimeofday>(2)) is subsequently made to "
1049 "the B<CLOCK_REALTIME> clock; and"
1050 msgstr ""
1051 "En ej fortsættende ændring (f.eks. B<settimeofday>(2)) er efterfølgende "
1052 "lavet på B<CLOCK_REALTIME>-uret; og"
1053
1054 #. type: IP
1055 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1056 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1057 #, no-wrap
1058 msgid "(3)"
1059 msgstr "(3)"
1060
1061 #. type: Plain text
1062 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1063 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1064 msgid ""
1065 "the caller once more calls B<timerfd_settime>() to rearm the timer (without "
1066 "first doing a B<read>(2) on the file descriptor)."
1067 msgstr ""
1068 "kalderen kaldte igen B<timerfd_settime>() for at bevæbne stopuret (uden "
1069 "først at lave en B<read>(2) på fildeskriptoren)."
1070
1071 #. type: Plain text
1072 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1073 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1074 msgid "In this case the following occurs:"
1075 msgstr "I dette tilfælde sker der det følgende:"
1076
1077 #. type: IP
1078 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1079 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1080 #, no-wrap
1081 msgid "\\[bu]"
1082 msgstr "\\[bu]"
1083
1084 #. type: Plain text
1085 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1086 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1087 msgid ""
1088 "The B<timerfd_settime>() returns -1 with I<errno> set to B<ECANCELED>. "
1089 "(This enables the caller to know that the previous timer was affected by a "
1090 "discontinuous change to the clock.)"
1091 msgstr ""
1092 "B<timerfd_settime>() returnerer -1 med I<errno> angivet til B<ECANCELED>. "
1093 "(Dette gør det muligt for kalderen at vide at det tidligere stopur var "
1094 "påvirket af en ej fortsættende ændring til uret)."
1095
1096 #. type: Plain text
1097 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1098 #: opensuse-tumbleweed
1099 msgid ""
1100 "The timer I<is successfully rearmed> with the settings provided in the "
1101 "second B<timerfd_settime>() call. (This was probably an implementation "
1102 "accident, but won't be fixed now, in case there are applications that depend "
1103 "on this behavior.)"
1104 msgstr ""
1105 "Stopuret I<er bevæbnet med succes> med indstillingerne angivet i det andet "
1106 "B<timerfd_settime>()-kald. (Dette var sandsynligvis et implementeringsuheld, "
1107 "men vil ikke blive rettet nu, i tilfælde af at der er programmer, der "
1108 "afhænger af denne opførelse)."
1109
1110 #. type: SH
1111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1113 #, no-wrap
1114 msgid "BUGS"
1115 msgstr "FEJL"
1116
1117 #. 2.6.29
1118 #. type: Plain text
1119 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1120 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1121 msgid ""
1122 "Currently, B<timerfd_create>() supports fewer types of clock IDs than "
1123 "B<timer_create>(2)."
1124 msgstr ""
1125 "I øjeblikket understøtter B<timerfd_create>() færre typer af ur-id'er end "
1126 "B<timer_create>(2)."
1127
1128 #. type: SH
1129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1131 #, no-wrap
1132 msgid "EXAMPLES"
1133 msgstr "EKSEMPLER"
1134
1135 #. type: Plain text
1136 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1137 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1138 msgid ""
1139 "The following program creates a timer and then monitors its progress. The "
1140 "program accepts up to three command-line arguments. The first argument "
1141 "specifies the number of seconds for the initial expiration of the timer. "
1142 "The second argument specifies the interval for the timer, in seconds. The "
1143 "third argument specifies the number of times the program should allow the "
1144 "timer to expire before terminating. The second and third command-line "
1145 "arguments are optional."
1146 msgstr ""
1147 "Det følgende program opretter et stopur og overvåger så dets status. "
1148 "Programmet accepterer op til tre kommandolinjeargumenter. Det første "
1149 "argument angiver antallet af sekunder for et oprindelige udløb for stopuret. "
1150 "Det andet argument angiver intervallet for stopuret, i sekunder. Det tredje "
1151 "argument angiver antallet af gange programmet bør tillade at stopuret "
1152 "udløber før afslutning. Det andet og det tredje kommandolinjeargument er "
1153 "valgfrie."
1154
1155 #. type: Plain text
1156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1158 msgid "The following shell session demonstrates the use of the program:"
1159 msgstr "Den følgende skalsession demonstrerer brugen af programmet:"
1160
1161 #. type: Plain text
1162 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1163 #: opensuse-tumbleweed
1164 #, no-wrap
1165 msgid ""
1166 "$B< a.out 3 1 100>\n"
1167 "0.000:\ttimer started\n"
1168 "3.000:\tread: 1; total=1\n"
1169 "4.000:\tread: 1; total=2\n"
1170 "B<\\[ha]Z > # type control-Z to suspend the program\n"
1171 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1172 "$ B<fg> # Resume execution after a few seconds\n"
1173 "a.out 3 1 100\n"
1174 "9.660:\tread: 5; total=7\n"
1175 "10.000:\tread: 1; total=8\n"
1176 "11.000:\tread: 1; total=9\n"
1177 "B<\\[ha]C > # type control-C to suspend the program\n"
1178 msgstr ""
1179 "$B< a.out 3 1 100>\n"
1180 "0.000:\ttimer started\n"
1181 "3.000:\tread: 1; total=1\n"
1182 "4.000:\tread: 1; total=2\n"
1183 "B<\\[ha]Z > # tast control-Z for at suspendere programmet\n"
1184 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1185 "$ B<fg> # Genoptag afvikling efter nogle få sekunder\n"
1186 "a.out 3 1 100\n"
1187 "9.660:\tread: 5; total=7\n"
1188 "10.000:\tread: 1; total=8\n"
1189 "11.000:\tread: 1; total=9\n"
1190 "B<\\[ha]C > # tast control-C for at suspendere programmet\n"
1191
1192 #. type: SS
1193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1195 #, no-wrap
1196 msgid "Program source"
1197 msgstr "Programkilde"
1198
1199 #
1200 #
1201 #
1202 #
1203 #
1204 #
1205 #
1206 #. The commented out code here is what we currently need until
1207 #. the required stuff is in glibc
1208 #. /* Link with \-lrt */
1209 #. #define _GNU_SOURCE
1210 #. #include <sys/syscall.h>
1211 #. #include <unistd.h>
1212 #. #include <time.h>
1213 #. #if defined(__i386__)
1214 #. #define __NR_timerfd_create 322
1215 #. #define __NR_timerfd_settime 325
1216 #. #define __NR_timerfd_gettime 326
1217 #. #endif
1218 #. static int
1219 #. timerfd_create(int clockid, int flags)
1220 #. {
1221 #. return syscall(__NR_timerfd_create, clockid, flags);
1222 #. }
1223 #. static int
1224 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
1225 #. struct itimerspec *curr_value)
1226 #. {
1227 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
1228 #. curr_value);
1229 #. }
1230 #. static int
1231 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
1232 #. {
1233 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
1234 #. }
1235 #. #define TFD_TIMER_ABSTIME (1 << 0)
1236 #. ////////////////////////////////////////////////////////////
1237 #. type: Plain text
1238 #: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed
1239 #, no-wrap
1240 msgid ""
1241 "#include E<lt>err.hE<gt>\n"
1242 "#include E<lt>inttypes.hE<gt>\n"
1243 "#include E<lt>stdio.hE<gt>\n"
1244 "#include E<lt>stdlib.hE<gt>\n"
1245 "#include E<lt>sys/timerfd.hE<gt>\n"
1246 "#include E<lt>sys/types.hE<gt>\n"
1247 "#include E<lt>time.hE<gt>\n"
1248 "#include E<lt>unistd.hE<gt>\n"
1249 "\\&\n"
1250 "static void\n"
1251 "print_elapsed_time(void)\n"
1252 "{\n"
1253 " int secs, nsecs;\n"
1254 " static int first_call = 1;\n"
1255 " struct timespec curr;\n"
1256 " static struct timespec start;\n"
1257 "\\&\n"
1258 " if (first_call) {\n"
1259 " first_call = 0;\n"
1260 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1261 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1262 " }\n"
1263 "\\&\n"
1264 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1265 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1266 "\\&\n"
1267 " secs = curr.tv_sec - start.tv_sec;\n"
1268 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1269 " if (nsecs E<lt> 0) {\n"
1270 " secs--;\n"
1271 " nsecs += 1000000000;\n"
1272 " }\n"
1273 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1274 "}\n"
1275 "\\&\n"
1276 "int\n"
1277 "main(int argc, char *argv[])\n"
1278 "{\n"
1279 " int fd;\n"
1280 " ssize_t s;\n"
1281 " uint64_t expir, tot_expir, max_expir;\n"
1282 " struct timespec now;\n"
1283 " struct itimerspec new_value;\n"
1284 "\\&\n"
1285 " if (argc != 2 && argc != 4) {\n"
1286 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1287 " argv[0]);\n"
1288 " exit(EXIT_FAILURE);\n"
1289 " }\n"
1290 "\\&\n"
1291 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1292 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1293 "\\&\n"
1294 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
1295 " expiration and interval as specified in command line. */\n"
1296 "\\&\n"
1297 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1298 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1299 " if (argc == 2) {\n"
1300 " new_value.it_interval.tv_sec = 0;\n"
1301 " max_expir = 1;\n"
1302 " } else {\n"
1303 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1304 " max_expir = atoi(argv[3]);\n"
1305 " }\n"
1306 " new_value.it_interval.tv_nsec = 0;\n"
1307 "\\&\n"
1308 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1309 " if (fd == -1)\n"
1310 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1311 "\\&\n"
1312 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1313 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1314 "\\&\n"
1315 " print_elapsed_time();\n"
1316 " printf(\"timer started\\[rs]n\");\n"
1317 "\\&\n"
1318 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1319 " s = read(fd, &expir, sizeof(uint64_t));\n"
1320 " if (s != sizeof(uint64_t))\n"
1321 " err(EXIT_FAILURE, \"read\");\n"
1322 "\\&\n"
1323 " tot_expir += expir;\n"
1324 " print_elapsed_time();\n"
1325 " printf(\"read: %w64u; total=%w64u\\[rs]n\", expir, tot_expir);\n"
1326 " }\n"
1327 "\\&\n"
1328 " exit(EXIT_SUCCESS);\n"
1329 "}\n"
1330 msgstr ""
1331 "#include E<lt>err.hE<gt>\n"
1332 "#include E<lt>inttypes.hE<gt>\n"
1333 "#include E<lt>stdio.hE<gt>\n"
1334 "#include E<lt>stdlib.hE<gt>\n"
1335 "#include E<lt>sys/timerfd.hE<gt>\n"
1336 "#include E<lt>sys/types.hE<gt>\n"
1337 "#include E<lt>time.hE<gt>\n"
1338 "#include E<lt>unistd.hE<gt>\n"
1339 "\\&\n"
1340 "static void\n"
1341 "print_elapsed_time(void)\n"
1342 "{\n"
1343 " int secs, nsecs;\n"
1344 " static int first_call = 1;\n"
1345 " struct timespec curr;\n"
1346 " static struct timespec start;\n"
1347 "\\&\n"
1348 " if (first_call) {\n"
1349 " first_call = 0;\n"
1350 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1351 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1352 " }\n"
1353 "\\&\n"
1354 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1355 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1356 "\\&\n"
1357 " secs = curr.tv_sec - start.tv_sec;\n"
1358 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1359 " if (nsecs E<lt> 0) {\n"
1360 " secs--;\n"
1361 " nsecs += 1000000000;\n"
1362 " }\n"
1363 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1364 "}\n"
1365 "\\&\n"
1366 "int\n"
1367 "main(int argc, char *argv[])\n"
1368 "{\n"
1369 " int fd;\n"
1370 " ssize_t s;\n"
1371 " uint64_t expir, tot_expir, max_expir;\n"
1372 " struct timespec now;\n"
1373 " struct itimerspec new_value;\n"
1374 "\\&\n"
1375 " if (argc != 2 && argc != 4) {\n"
1376 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1377 " argv[0]);\n"
1378 " exit(EXIT_FAILURE);\n"
1379 " }\n"
1380 "\\&\n"
1381 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1382 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1383 "\\&\n"
1384 " /* Opret et CLOCK_REALTIME-absolut stopur med oprindelig\n"
1385 " udløb og interval som angivet på kommandolinjen. */\n"
1386 "\\&\n"
1387 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1388 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1389 " if (argc == 2) {\n"
1390 " new_value.it_interval.tv_sec = 0;\n"
1391 " max_expir = 1;\n"
1392 " } else {\n"
1393 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1394 " max_expir = atoi(argv[3]);\n"
1395 " }\n"
1396 " new_value.it_interval.tv_nsec = 0;\n"
1397 "\\&\n"
1398 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1399 " if (fd == -1)\n"
1400 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1401 "\\&\n"
1402 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1403 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1404 "\\&\n"
1405 " print_elapsed_time();\n"
1406 " printf(\"timer started\\[rs]n\");\n"
1407 "\\&\n"
1408 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1409 " s = read(fd, &expir, sizeof(uint64_t));\n"
1410 " if (s != sizeof(uint64_t))\n"
1411 " err(EXIT_FAILURE, \"read\");\n"
1412 "\\&\n"
1413 " tot_expir += expir;\n"
1414 " print_elapsed_time();\n"
1415 " printf(\"read: %w64u; total=%w64u\\[rs]n\", expir, tot_expir);\n"
1416 " }\n"
1417 "\\&\n"
1418 " exit(EXIT_SUCCESS);\n"
1419 "}\n"
1420
1421 #. SRC END
1422 #. type: SH
1423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1425 #, no-wrap
1426 msgid "SEE ALSO"
1427 msgstr "SE OGSÅ"
1428
1429 #. type: Plain text
1430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1432 msgid ""
1433 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
1434 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
1435 "B<timer_settime>(2), B<timespec>(3), B<epoll>(7), B<time>(7)"
1436 msgstr ""
1437 "B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), "
1438 "B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), "
1439 "B<timer_settime>(2), B<timespec>(3), B<epoll>(7), B<time>(7)"
1440
1441 #. type: TH
1442 #: debian-trixie
1443 #, no-wrap
1444 msgid "2024-06-15"
1445 msgstr "15. juni 2024"
1446
1447 #. type: TH
1448 #: debian-trixie
1449 #, no-wrap
1450 msgid "Linux man-pages 6.9.1"
1451 msgstr "Linux man-pages 6.9.1"
1452
1453 #. type: Plain text
1454 #: debian-trixie
1455 msgid "Standard C library (I<libc>, I<-lc>)"
1456 msgstr "C-standardbibliotek (I<libc>, I<-lc>)"
1457
1458 #. type: Plain text
1459 #: debian-trixie fedora-44 fedora-rawhide
1460 msgid ""
1461 "The timer I<is successfully rearmed> with the settings provided in the "
1462 "second B<timerfd_settime>() call. (This was probably an implementation "
1463 "accident, but won't be fixed now, in case there are applications that depend "
1464 "on this behaviour.)"
1465 msgstr ""
1466 "Stopuret er I<med succes bevæbnet> med indstillingerne angivet i det andet "
1467 "B<timerfd_settime>()-kald. (Dette var sandsynligvis et implemetneringsuheld, "
1468 "men det vil ikke blive rettet nu, da der kan være programmer, der afhænger "
1469 "af denne opførelse)."
1470
1471 #. type: Plain text
1472 #: debian-trixie fedora-44 fedora-rawhide
1473 #, no-wrap
1474 msgid ""
1475 "$B< a.out 3 1 100>\n"
1476 "0.000: timer started\n"
1477 "3.000: read: 1; total=1\n"
1478 "4.000: read: 1; total=2\n"
1479 "B<\\[ha]Z > # type control-Z to suspend the program\n"
1480 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1481 "$ B<fg> # Resume execution after a few seconds\n"
1482 "a.out 3 1 100\n"
1483 "9.660: read: 5; total=7\n"
1484 "10.000: read: 1; total=8\n"
1485 "11.000: read: 1; total=9\n"
1486 "B<\\[ha]C > # type control-C to suspend the program\n"
1487 msgstr ""
1488 "$B< a.out 3 1 100>\n"
1489 "0.000: timer started\n"
1490 "3.000: read: 1; total=1\n"
1491 "4.000: read: 1; total=2\n"
1492 "B<\\[ha]Z > # tast control-Z for at suspendere programmet\n"
1493 "[1]+ Stopped ./timerfd3_demo 3 1 100\n"
1494 "$ B<fg> # Genoptag afvikling efter nogle få sekunder\n"
1495 "a.out 3 1 100\n"
1496 "9.660: read: 5; total=7\n"
1497 "10.000: read: 1; total=8\n"
1498 "11.000: read: 1; total=9\n"
1499 "B<\\[ha]C > # tast control-C for at suspendere programmet\n"
1500
1501 #
1502 #
1503 #
1504 #
1505 #
1506 #
1507 #
1508 #. The commented out code here is what we currently need until
1509 #. the required stuff is in glibc
1510 #. /* Link with \-lrt */
1511 #. #define _GNU_SOURCE
1512 #. #include <sys/syscall.h>
1513 #. #include <unistd.h>
1514 #. #include <time.h>
1515 #. #if defined(__i386__)
1516 #. #define __NR_timerfd_create 322
1517 #. #define __NR_timerfd_settime 325
1518 #. #define __NR_timerfd_gettime 326
1519 #. #endif
1520 #. static int
1521 #. timerfd_create(int clockid, int flags)
1522 #. {
1523 #. return syscall(__NR_timerfd_create, clockid, flags);
1524 #. }
1525 #. static int
1526 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
1527 #. struct itimerspec *curr_value)
1528 #. {
1529 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
1530 #. curr_value);
1531 #. }
1532 #. static int
1533 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
1534 #. {
1535 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
1536 #. }
1537 #. #define TFD_TIMER_ABSTIME (1 << 0)
1538 #. ////////////////////////////////////////////////////////////
1539 #. type: Plain text
1540 #: debian-trixie fedora-44 fedora-rawhide
1541 #, no-wrap
1542 msgid ""
1543 "#include E<lt>err.hE<gt>\n"
1544 "#include E<lt>inttypes.hE<gt>\n"
1545 "#include E<lt>stdio.hE<gt>\n"
1546 "#include E<lt>stdlib.hE<gt>\n"
1547 "#include E<lt>sys/timerfd.hE<gt>\n"
1548 "#include E<lt>sys/types.hE<gt>\n"
1549 "#include E<lt>time.hE<gt>\n"
1550 "#include E<lt>unistd.hE<gt>\n"
1551 "\\&\n"
1552 "static void\n"
1553 "print_elapsed_time(void)\n"
1554 "{\n"
1555 " int secs, nsecs;\n"
1556 " static int first_call = 1;\n"
1557 " struct timespec curr;\n"
1558 " static struct timespec start;\n"
1559 "\\&\n"
1560 " if (first_call) {\n"
1561 " first_call = 0;\n"
1562 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1563 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1564 " }\n"
1565 "\\&\n"
1566 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1567 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1568 "\\&\n"
1569 " secs = curr.tv_sec - start.tv_sec;\n"
1570 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1571 " if (nsecs E<lt> 0) {\n"
1572 " secs--;\n"
1573 " nsecs += 1000000000;\n"
1574 " }\n"
1575 " printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
1576 "}\n"
1577 "\\&\n"
1578 "int\n"
1579 "main(int argc, char *argv[])\n"
1580 "{\n"
1581 " int fd;\n"
1582 " ssize_t s;\n"
1583 " uint64_t exp, tot_exp, max_exp;\n"
1584 " struct timespec now;\n"
1585 " struct itimerspec new_value;\n"
1586 "\\&\n"
1587 " if (argc != 2 && argc != 4) {\n"
1588 " fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\[rs]n\",\n"
1589 " argv[0]);\n"
1590 " exit(EXIT_FAILURE);\n"
1591 " }\n"
1592 "\\&\n"
1593 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1594 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1595 "\\&\n"
1596 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
1597 " expiration and interval as specified in command line. */\n"
1598 "\\&\n"
1599 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1600 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1601 " if (argc == 2) {\n"
1602 " new_value.it_interval.tv_sec = 0;\n"
1603 " max_exp = 1;\n"
1604 " } else {\n"
1605 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1606 " max_exp = atoi(argv[3]);\n"
1607 " }\n"
1608 " new_value.it_interval.tv_nsec = 0;\n"
1609 "\\&\n"
1610 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1611 " if (fd == -1)\n"
1612 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1613 "\\&\n"
1614 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1615 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1616 "\\&\n"
1617 " print_elapsed_time();\n"
1618 " printf(\"timer started\\[rs]n\");\n"
1619 "\\&\n"
1620 " for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
1621 " s = read(fd, &exp, sizeof(uint64_t));\n"
1622 " if (s != sizeof(uint64_t))\n"
1623 " err(EXIT_FAILURE, \"read\");\n"
1624 "\\&\n"
1625 " tot_exp += exp;\n"
1626 " print_elapsed_time();\n"
1627 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\", exp, tot_exp);\n"
1628 " }\n"
1629 "\\&\n"
1630 " exit(EXIT_SUCCESS);\n"
1631 "}\n"
1632 msgstr ""
1633 "#include E<lt>err.hE<gt>\n"
1634 "#include E<lt>inttypes.hE<gt>\n"
1635 "#include E<lt>stdio.hE<gt>\n"
1636 "#include E<lt>stdlib.hE<gt>\n"
1637 "#include E<lt>sys/timerfd.hE<gt>\n"
1638 "#include E<lt>sys/types.hE<gt>\n"
1639 "#include E<lt>time.hE<gt>\n"
1640 "#include E<lt>unistd.hE<gt>\n"
1641 "\\&\n"
1642 "static void\n"
1643 "print_elapsed_time(void)\n"
1644 "{\n"
1645 " int secs, nsecs;\n"
1646 " static int first_call = 1;\n"
1647 " struct timespec curr;\n"
1648 " static struct timespec start;\n"
1649 "\\&\n"
1650 " if (first_call) {\n"
1651 " first_call = 0;\n"
1652 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1653 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1654 " }\n"
1655 "\\&\n"
1656 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1657 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1658 "\\&\n"
1659 " secs = curr.tv_sec - start.tv_sec;\n"
1660 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1661 " if (nsecs E<lt> 0) {\n"
1662 " secs--;\n"
1663 " nsecs += 1000000000;\n"
1664 " }\n"
1665 " printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n"
1666 "}\n"
1667 "\\&\n"
1668 "int\n"
1669 "main(int argc, char *argv[])\n"
1670 "{\n"
1671 " int fd;\n"
1672 " ssize_t s;\n"
1673 " uint64_t exp, tot_exp, max_exp;\n"
1674 " struct timespec now;\n"
1675 " struct itimerspec new_value;\n"
1676 "\\&\n"
1677 " if (argc != 2 && argc != 4) {\n"
1678 " fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\[rs]n\",\n"
1679 " argv[0]);\n"
1680 " exit(EXIT_FAILURE);\n"
1681 " }\n"
1682 "\\&\n"
1683 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1684 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1685 "\\&\n"
1686 " /* Opret et CLOCK_REALTIME-absolut stopur med oprindelig\n"
1687 " udløb og interval som angivet på kommandolinjen. */\n"
1688 "\\&\n"
1689 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1690 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1691 " if (argc == 2) {\n"
1692 " new_value.it_interval.tv_sec = 0;\n"
1693 " max_exp = 1;\n"
1694 " } else {\n"
1695 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1696 " max_exp = atoi(argv[3]);\n"
1697 " }\n"
1698 " new_value.it_interval.tv_nsec = 0;\n"
1699 "\\&\n"
1700 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1701 " if (fd == -1)\n"
1702 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1703 "\\&\n"
1704 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1705 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1706 "\\&\n"
1707 " print_elapsed_time();\n"
1708 " printf(\"timer started\\[rs]n\");\n"
1709 "\\&\n"
1710 " for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n"
1711 " s = read(fd, &exp, sizeof(uint64_t));\n"
1712 " if (s != sizeof(uint64_t))\n"
1713 " err(EXIT_FAILURE, \"read\");\n"
1714 "\\&\n"
1715 " tot_exp += exp;\n"
1716 " print_elapsed_time();\n"
1717 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\", exp, tot_exp);\n"
1718 " }\n"
1719 "\\&\n"
1720 " exit(EXIT_SUCCESS);\n"
1721 "}\n"
1722
1723 #. type: TH
1724 #: fedora-44 fedora-rawhide
1725 #, no-wrap
1726 msgid "2024-07-23"
1727 msgstr "23. juli 2024"
1728
1729 #. type: TH
1730 #: fedora-44 fedora-rawhide
1731 #, no-wrap
1732 msgid "Linux man-pages 6.13"
1733 msgstr "Linux man-pages 6.13"
1734
1735 #. type: TH
1736 #: mageia-cauldron
1737 #, no-wrap
1738 msgid "2026-02-08"
1739 msgstr "8. februar 2026"
1740
1741 #. type: TH
1742 #: mageia-cauldron
1743 #, no-wrap
1744 msgid "Linux man-pages 6.17"
1745 msgstr "Linux man-pages 6.17"
1746
1747 #
1748 #
1749 #
1750 #
1751 #
1752 #
1753 #
1754 #. The commented out code here is what we currently need until
1755 #. the required stuff is in glibc
1756 #. /* Link with \-lrt */
1757 #. #define _GNU_SOURCE
1758 #. #include <sys/syscall.h>
1759 #. #include <unistd.h>
1760 #. #include <time.h>
1761 #. #if defined(__i386__)
1762 #. #define __NR_timerfd_create 322
1763 #. #define __NR_timerfd_settime 325
1764 #. #define __NR_timerfd_gettime 326
1765 #. #endif
1766 #. static int
1767 #. timerfd_create(int clockid, int flags)
1768 #. {
1769 #. return syscall(__NR_timerfd_create, clockid, flags);
1770 #. }
1771 #. static int
1772 #. timerfd_settime(int fd, int flags, struct itimerspec *new_value,
1773 #. struct itimerspec *curr_value)
1774 #. {
1775 #. return syscall(__NR_timerfd_settime, fd, flags, new_value,
1776 #. curr_value);
1777 #. }
1778 #. static int
1779 #. timerfd_gettime(int fd, struct itimerspec *curr_value)
1780 #. {
1781 #. return syscall(__NR_timerfd_gettime, fd, curr_value);
1782 #. }
1783 #. #define TFD_TIMER_ABSTIME (1 << 0)
1784 #. ////////////////////////////////////////////////////////////
1785 #. type: Plain text
1786 #: mageia-cauldron
1787 #, no-wrap
1788 msgid ""
1789 "#include E<lt>err.hE<gt>\n"
1790 "#include E<lt>inttypes.hE<gt>\n"
1791 "#include E<lt>stdio.hE<gt>\n"
1792 "#include E<lt>stdlib.hE<gt>\n"
1793 "#include E<lt>sys/timerfd.hE<gt>\n"
1794 "#include E<lt>sys/types.hE<gt>\n"
1795 "#include E<lt>time.hE<gt>\n"
1796 "#include E<lt>unistd.hE<gt>\n"
1797 "\\&\n"
1798 "static void\n"
1799 "print_elapsed_time(void)\n"
1800 "{\n"
1801 " int secs, nsecs;\n"
1802 " static int first_call = 1;\n"
1803 " struct timespec curr;\n"
1804 " static struct timespec start;\n"
1805 "\\&\n"
1806 " if (first_call) {\n"
1807 " first_call = 0;\n"
1808 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1809 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1810 " }\n"
1811 "\\&\n"
1812 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1813 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1814 "\\&\n"
1815 " secs = curr.tv_sec - start.tv_sec;\n"
1816 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1817 " if (nsecs E<lt> 0) {\n"
1818 " secs--;\n"
1819 " nsecs += 1000000000;\n"
1820 " }\n"
1821 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1822 "}\n"
1823 "\\&\n"
1824 "int\n"
1825 "main(int argc, char *argv[])\n"
1826 "{\n"
1827 " int fd;\n"
1828 " ssize_t s;\n"
1829 " uint64_t expir, tot_expir, max_expir;\n"
1830 " struct timespec now;\n"
1831 " struct itimerspec new_value;\n"
1832 "\\&\n"
1833 " if (argc != 2 && argc != 4) {\n"
1834 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1835 " argv[0]);\n"
1836 " exit(EXIT_FAILURE);\n"
1837 " }\n"
1838 "\\&\n"
1839 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1840 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1841 "\\&\n"
1842 " /* Create a CLOCK_REALTIME absolute timer with initial\n"
1843 " expiration and interval as specified in command line. */\n"
1844 "\\&\n"
1845 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1846 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1847 " if (argc == 2) {\n"
1848 " new_value.it_interval.tv_sec = 0;\n"
1849 " max_expir = 1;\n"
1850 " } else {\n"
1851 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1852 " max_expir = atoi(argv[3]);\n"
1853 " }\n"
1854 " new_value.it_interval.tv_nsec = 0;\n"
1855 "\\&\n"
1856 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1857 " if (fd == -1)\n"
1858 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1859 "\\&\n"
1860 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1861 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1862 "\\&\n"
1863 " print_elapsed_time();\n"
1864 " printf(\"timer started\\[rs]n\");\n"
1865 "\\&\n"
1866 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1867 " s = read(fd, &expir, sizeof(uint64_t));\n"
1868 " if (s != sizeof(uint64_t))\n"
1869 " err(EXIT_FAILURE, \"read\");\n"
1870 "\\&\n"
1871 " tot_expir += expir;\n"
1872 " print_elapsed_time();\n"
1873 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\",\n"
1874 " expir, tot_expir);\n"
1875 " }\n"
1876 "\\&\n"
1877 " exit(EXIT_SUCCESS);\n"
1878 "}\n"
1879 msgstr ""
1880 "#include E<lt>err.hE<gt>\n"
1881 "#include E<lt>inttypes.hE<gt>\n"
1882 "#include E<lt>stdio.hE<gt>\n"
1883 "#include E<lt>stdlib.hE<gt>\n"
1884 "#include E<lt>sys/timerfd.hE<gt>\n"
1885 "#include E<lt>sys/types.hE<gt>\n"
1886 "#include E<lt>time.hE<gt>\n"
1887 "#include E<lt>unistd.hE<gt>\n"
1888 "\\&\n"
1889 "static void\n"
1890 "print_elapsed_time(void)\n"
1891 "{\n"
1892 " int secs, nsecs;\n"
1893 " static int first_call = 1;\n"
1894 " struct timespec curr;\n"
1895 " static struct timespec start;\n"
1896 "\\&\n"
1897 " if (first_call) {\n"
1898 " first_call = 0;\n"
1899 " if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n"
1900 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1901 " }\n"
1902 "\\&\n"
1903 " if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n"
1904 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1905 "\\&\n"
1906 " secs = curr.tv_sec - start.tv_sec;\n"
1907 " nsecs = curr.tv_nsec - start.tv_nsec;\n"
1908 " if (nsecs E<lt> 0) {\n"
1909 " secs--;\n"
1910 " nsecs += 1000000000;\n"
1911 " }\n"
1912 " printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n"
1913 "}\n"
1914 "\\&\n"
1915 "int\n"
1916 "main(int argc, char *argv[])\n"
1917 "{\n"
1918 " int fd;\n"
1919 " ssize_t s;\n"
1920 " uint64_t expir, tot_expir, max_expir;\n"
1921 " struct timespec now;\n"
1922 " struct itimerspec new_value;\n"
1923 "\\&\n"
1924 " if (argc != 2 && argc != 4) {\n"
1925 " fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n"
1926 " argv[0]);\n"
1927 " exit(EXIT_FAILURE);\n"
1928 " }\n"
1929 "\\&\n"
1930 " if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n"
1931 " err(EXIT_FAILURE, \"clock_gettime\");\n"
1932 "\\&\n"
1933 " /* Opret et CLOCK_REALTIME-absolut stopur med oprindelig\n"
1934 " udløb og interval som angivet på kommandolinjen. */\n"
1935 "\\&\n"
1936 " new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n"
1937 " new_value.it_value.tv_nsec = now.tv_nsec;\n"
1938 " if (argc == 2) {\n"
1939 " new_value.it_interval.tv_sec = 0;\n"
1940 " max_expir = 1;\n"
1941 " } else {\n"
1942 " new_value.it_interval.tv_sec = atoi(argv[2]);\n"
1943 " max_expir = atoi(argv[3]);\n"
1944 " }\n"
1945 " new_value.it_interval.tv_nsec = 0;\n"
1946 "\\&\n"
1947 " fd = timerfd_create(CLOCK_REALTIME, 0);\n"
1948 " if (fd == -1)\n"
1949 " err(EXIT_FAILURE, \"timerfd_create\");\n"
1950 "\\&\n"
1951 " if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n"
1952 " err(EXIT_FAILURE, \"timerfd_settime\");\n"
1953 "\\&\n"
1954 " print_elapsed_time();\n"
1955 " printf(\"timer started\\[rs]n\");\n"
1956 "\\&\n"
1957 " for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n"
1958 " s = read(fd, &expir, sizeof(uint64_t));\n"
1959 " if (s != sizeof(uint64_t))\n"
1960 " err(EXIT_FAILURE, \"read\");\n"
1961 "\\&\n"
1962 " tot_expir += expir;\n"
1963 " print_elapsed_time();\n"
1964 " printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\",\n"
1965 " expir, tot_expir);\n"
1966 " }\n"
1967 "\\&\n"
1968 " exit(EXIT_SUCCESS);\n"
1969 "}\n"
1970
1971 #. type: TH
1972 #: opensuse-leap-16-1 opensuse-tumbleweed
1973 #, no-wrap
1974 msgid "Linux man-pages (unreleased)"
1975 msgstr "Linux man-pages (ej udgivet)"