From: Daniel Ribeiro Date: Mon, 10 Jan 2011 17:14:26 +0000 (-0200) Subject: Add HZ_TO_NS macro X-Git-Tag: libsigrok-0.1.0~455 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3677f3ec3f76ec3efc8aea97a1b050f6949d773d;p=libsigrok.git Add HZ_TO_NS macro --- diff --git a/sigrok.h b/sigrok.h index 5606a1e5..ebbfcb89 100644 --- a/sigrok.h +++ b/sigrok.h @@ -59,6 +59,8 @@ #define MHZ(n) ((n) * 1000000) #define GHZ(n) ((n) * 1000000000) +#define HZ_TO_NS(n) (1000000000 / (n)) + #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #endif