aspeed/i2c: Clean up local variable shadowing
[qemu/kevin.git] / pc-bios / s390-ccw / s390-time.h
blobed6d982371855a79d5e3e4a061e358164fd11f3c
1 #ifndef TIME_H
2 #define TIME_H
4 static inline u64 get_clock(void)
6 u64 r;
8 asm volatile("stck %0" : "=Q" (r) : : "cc");
9 return r;
12 static inline u64 get_time_ms(void)
14 /* Bit 51 is incremented each microsecond */
15 return (get_clock() >> 12) / 1000;
18 static inline u64 get_time_seconds(void)
20 return get_time_ms() / 1000;
23 #endif