+SilcBool silc_time_generalized_string(SilcTime time_val, char *ret_string,
+ SilcUInt32 ret_string_size);
+
+/****f* silcutil/SilcTimeAPI/silc_compare_timeval
+ *
+ * SYNOPSIS
+ *
+ * int silc_compare_timeval(struct time_val *t1, struct time_val *t2);
+ *
+ * DESCRIPTION
+ *
+ * Compares `t1' and `t2' time structures and returns less than zero,
+ * zero or more than zero when `t1' is smaller, equal or bigger than
+ * `t2', respectively.
+ *
+ ***/
+int silc_compare_timeval(struct timeval *t1, struct timeval *t2);
+
+/****f* silcutil/SilcTimeAPI/silc_gettimeofday
+ *
+ * SYNOPSIS
+ *
+ * int silc_gettimeofday(struct timeval *p);
+ *
+ * DESCRIPTION
+ *
+ * Return current time to struct timeval. This function is system
+ * dependant. Returns 0 on success and -1 on error.
+ *
+ ***/
+int silc_gettimeofday(struct timeval *p);
+
+/****f* silcutil/SilcTimeAPI/silc_usleep
+ *
+ * SYNOPSIS
+ *
+ * void silc_usleep(unsigned long microseconds);
+ *
+ * DESCRIPTION
+ *
+ * Delays the execution of process/thread for the specified amount of
+ * time, which is in microseconds.
+ *
+ * NOTES
+ *
+ * The delay is only approximate and on some platforms the resolution is
+ * in fact milliseconds.
+ *
+ ***/
+static inline
+void silc_usleep(unsigned long microseconds)
+{
+#ifdef SILC_UNIX
+#ifdef HAVE_NANOSLEEP
+ struct timespec tv;
+ tv.tv_sec = 0;
+ tv.tv_nsec = microseconds * 1000;
+#endif /* HAVE_NANOSLEEP */
+#endif /* SILC_UNIX */
+
+#ifdef SILC_UNIX
+#ifdef HAVE_NANOSLEEP
+ nanosleep(&tv, NULL);
+#else
+ usleep(microseconds);
+#endif /* HAVE_NANOSLEEP */
+#endif /* SILC_UNIX */
+#ifdef SILC_WIN32
+ Sleep(microseconds / 1000);
+#endif /* SILC_WIN32 */
+#ifdef SILC_SYMBIAN
+ silc_symbian_usleep(microseconds);
+#endif /* SILC_SYMBIAN */
+}