Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1248)

Side by Side Diff: fusl/src/unistd/ualarm.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #define _GNU_SOURCE 1 #define _GNU_SOURCE
2 #include <unistd.h> 2 #include <unistd.h>
3 #include <sys/time.h> 3 #include <sys/time.h>
4 4
5 unsigned ualarm(unsigned value, unsigned interval) 5 unsigned ualarm(unsigned value, unsigned interval) {
6 { 6 struct itimerval it = {.it_interval.tv_usec = interval,
7 » struct itimerval it = { 7 .it_value.tv_usec = value};
8 » » .it_interval.tv_usec = interval, 8 setitimer(ITIMER_REAL, &it, &it);
9 » » .it_value.tv_usec = value 9 return it.it_value.tv_sec * 1000000 + it.it_value.tv_usec;
10 » };
11 » setitimer(ITIMER_REAL, &it, &it);
12 » return it.it_value.tv_sec*1000000 + it.it_value.tv_usec;
13 } 10 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698