return 0;
}
+INTERN unsigned long
+tdm_helper_get_time_in_micros(void)
+{
+ struct timespec tp;
+
+ if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+ return (tp.tv_sec * 1000000) + (tp.tv_nsec / 1000L);
+
+ return 0;
+}
+
static void
_tdm_helper_dump_raw(const char *file, void *data1, int size1, void *data2,
int size2, void *data3, int size3)
return;
}
- if (dumppath == NULL) {
- TDM_DBG("tdm_helper_dump dumppath is null.");
+ if (dumppath == NULL || count == NULL) {
+ TDM_DBG("tdm_helper_dump dumppath or count is null.");
return;
}
TDM_DBG("tdm_helper_dump stop.");
}
-INTERN int
-tdm_helper_get_dump_count(void)
-{
- if ((tdm_helper_dump_count != NULL) && (tdm_helper_dump_path != NULL)) {
- if (*tdm_helper_dump_count == 1000)
- *tdm_helper_dump_count = 1;
- return (*tdm_helper_dump_count)++;
- } else
- return 0;
-}
-
-INTERN char *
-tdm_helper_get_dump_path(void)
-{
- return tdm_helper_dump_path;
-}