op_get_time.c revision cc2ee177dbb3befca43e36cfc56778b006c3d050
1/**
2 * @file op_get_time.c
3 * Get current time as a string
4 *
5 * @remark Copyright 2002 OProfile authors
6 * @remark Read the file COPYING
7 *
8 * @author John Levon
9 * @author Philippe Elie
10 */
11
12#include "op_get_time.h"
13
14#include <time.h>
15
16char * op_get_time(void)
17{
18	time_t t = time(NULL);
19
20	if (t == -1)
21		return "";
22
23	return ctime(&t);
24}
25