Index: uspace/lib/c/generic/device/clock_dev.c
===================================================================
--- uspace/lib/c/generic/device/clock_dev.c	(revision 85f20643f5a50d25ca775e64fad72573fcdf8e7d)
+++ uspace/lib/c/generic/device/clock_dev.c	(revision f4ebaf3c79c126043b20e90b33796de303a64de1)
@@ -75,4 +75,40 @@
 }
 
+/** Set the current time
+ *
+ * @param sess   Session of the device
+ * @param t      The current time that will be written to the device
+ *
+ * @return       EOK on success or a negative error code
+ */
+int
+clock_dev_time_set(async_sess_t *sess, struct tm *t)
+{
+	ipc_call_t answer;
+	aid_t req;
+	int ret;
+
+	async_exch_t *exch = async_exchange_begin(sess);
+
+	req = async_send_1(exch, DEV_IFACE_ID(CLOCK_DEV_IFACE),
+	    CLOCK_DEV_TIME_SET, &answer);
+	ret = async_data_write_start(exch, t, sizeof(*t));
+
+	async_exchange_end(exch);
+
+	sysarg_t rc;
+	if (ret != EOK) {
+		async_wait_for(req, &rc);
+		if (rc == EOK)
+			return ret;
+	}
+
+	async_wait_for(req, &rc);
+	if ((int) rc != EOK)
+		return ret;
+
+	return (int) IPC_GET_ARG1(answer);
+}
+
 /** @}
  */
Index: uspace/lib/c/include/device/clock_dev.h
===================================================================
--- uspace/lib/c/include/device/clock_dev.h	(revision 85f20643f5a50d25ca775e64fad72573fcdf8e7d)
+++ uspace/lib/c/include/device/clock_dev.h	(revision f4ebaf3c79c126043b20e90b33796de303a64de1)
@@ -45,4 +45,5 @@
 
 extern int clock_dev_time_get(async_sess_t *, struct tm *);
+extern int clock_dev_time_set(async_sess_t *, struct tm *);
 
 #endif
