X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=strutil.c;h=c147b961eb94a6c1aeb2dc4468aa97f388771950;hb=6b2d8d3e5c4762cdafd847f9613d3f7b855927ab;hp=5be26bbc6ed57afac3b20b66a6b66c7fb5fb9ed6;hpb=3c0839d52475605d61ce385eda95f824fc448c88;p=libsigrok.git diff --git a/strutil.c b/strutil.c index 5be26bbc..c147b961 100644 --- a/strutil.c +++ b/strutil.c @@ -334,16 +334,17 @@ SR_API int sr_parse_sizestring(const char *sizestring, uint64_t *size) * @param timestring A string containing a (decimal) time value. * @return The string's time value as uint64_t, in milliseconds. * - * TODO: Error handling. - * TODO: Add support for "m" (minutes) and others. - * TODO: picoseconds? - * TODO: Allow both lower-case and upper-case. + * @todo Add support for "m" (minutes) and others. + * @todo Add support for picoseconds? + * @todo Allow both lower-case and upper-case? If no, document it. */ SR_API uint64_t sr_parse_timestring(const char *timestring) { uint64_t time_msec; char *s; + /* TODO: Error handling, logging. */ + time_msec = strtoull(timestring, &s, 10); if (time_msec == 0 && s == timestring) return 0;