Small fixes after run-through.
[libguestfs-talks.git] / 2020-frama-c / 5200-timeval.html
1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
2 <link rel="stylesheet" href="style.css" type="text/css"/>
3 <script src="code.js" type="text/javascript"></script>
4
5 <h1>nbdkit tvdiff_usec</h1>
6
7 <pre class="code">
8   /* Return the number of µs (microseconds) in y - x. */
9   static inline int64_t
10   tvdiff_usec (const struct timeval *x, const struct timeval *y)
11   {
12     int64_t usec;
13
14     usec = (y->tv_sec - x->tv_sec) * 1000000;
15     usec += y->tv_usec - x->tv_usec;
16     return usec;
17   }
18 </pre>