X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=strutil.c;h=2c4d5c814e9503012a5a42d7ecddb66e4772c72a;hb=f48cef7897ecda093a7d8b37b2bfeb1868c529af;hp=c5e7dce81ffeefc1e503955b8169d4cfc900041a;hpb=a885ce3ee9ed770594d5b231f6dec0b740bba03b;p=libsigrok.git diff --git a/strutil.c b/strutil.c index c5e7dce8..2c4d5c81 100644 --- a/strutil.c +++ b/strutil.c @@ -403,7 +403,11 @@ SR_API int sr_parse_period(const char *periodstr, struct sr_rational *r) if (s && *s) { while (*s == ' ') s++; - if (!strcmp(s, "ns")) + if (!strcmp(s, "fs")) + r->q = 1000000000000000L; + else if (!strcmp(s, "ps")) + r->q = 1000000000000L; + else if (!strcmp(s, "ns")) r->q = 1000000000L; else if (!strcmp(s, "us")) r->q = 1000000;