forked from enlightenment/efl
eina_evlog: Don't call get_time prematurely
If we're not logging events this generates a lot of wasted system calls. They probably don't amount to much, but it's trivial to get rid of them, and they make a mess when logging with strace.
This commit is contained in:
parent
4697d0c2b3
commit
853adace69
|
@ -130,11 +130,12 @@ eina_evlog(const char *event, void *obj, double srctime, const char *detail)
|
|||
Eina_Evlog_Item *item;
|
||||
int size;
|
||||
char *strings;
|
||||
double now = get_time();
|
||||
double now;
|
||||
unsigned short detail_offset = 0;
|
||||
unsigned short event_size;
|
||||
|
||||
if (!_evlog_go) return;
|
||||
now = get_time();
|
||||
eina_spinlock_take(&_evlog_lock);
|
||||
size = sizeof(Eina_Evlog_Item);
|
||||
event_size = strlen(event) + 1;
|
||||
|
|
Loading…
Reference in New Issue