[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 1/2] arch/time: Macro for sub-seconds part of nanoseconds



On 16.03.2018 07:44, Dafna Hirschfeld wrote:
The ukdebug library needs to print the sub-seconds part
of the time, so add macro for that.

Hum, can you rephrase the commit message?
In essence, you introduce a new conversion macro. In the future there might be other components depending on this definition so I would not mention the dependency but explain briefly for what the macro is used for and why it is useful.


Signed-off-by: Dafna Hirschfeld <dafna3@xxxxxxxxx>
---
  include/uk/arch/time.h | 1 +
  1 file changed, 1 insertion(+)

diff --git a/include/uk/arch/time.h b/include/uk/arch/time.h
index d436a3b..16a8a2b 100644
--- a/include/uk/arch/time.h
+++ b/include/uk/arch/time.h
@@ -57,6 +57,7 @@ typedef __s64 __snsec;
  #define ukarch_time_nsec_to_sec(ns)      ((ns) / 1000000000ULL)
  #define ukarch_time_nsec_to_msec(ns)     ((ns) / 1000000ULL)
  #define ukarch_time_nsec_to_usec(ns)     ((ns) / 1000UL)
+#define ukarch_time_subseconds(ns)       ((ns) % 1000000000ULL)

Just a minor thing: Can you call it ukarch_time_subsec() so that it is inline with the naming scheme in this file?

#define ukarch_time_sec_to_nsec(sec) ((sec) * 1000000000UL)
  #define ukarch_time_msec_to_nsec(msec)   ((msec) * 1000000UL)


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.