Page MenuHomePhabricator

Evil: add gettimeofday()
ClosedPublic

Authored by vtorri on Aug 21 2020, 10:54 PM.

Details

Summary

Add gettimeofday implementation based on the mingw one, using a more acurate function if Windows >= 8

Test Plan

test program

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vtorri created this revision.Aug 21 2020, 10:54 PM
vtorri requested review of this revision.Aug 21 2020, 10:54 PM

I've got an error in src/lib/ecore/ecore_time.c:

../src/lib/ecore/ecore_time.c(64,3): error: "Your platform isn't supported yet"
# error "Your platform isn't supported yet"
  ^
1 error generated.

Because HAVE_GETTIMEOFDAY isn't defined.

src/lib/evil/evil_macro_wrapper.h
60

Maybe define HAVE_GETTIMEOFDAY too?

see D12112

Oh right right. I should apply that before this one?

lucas added a subscriber: lucas.EditedAug 24 2020, 12:45 PM

see D12112

Oh right right. I should apply that before this one?

I think the order doesn't matter. But as HAVE_GETTIMEOFDAY was not defined you will need both.

jptiz added a comment.Aug 24 2020, 1:11 PM

see D12112

Oh right right. I should apply that before this one?

I think the order doesn't matter. But as HAVE_GETTIMEOFDAY was not defined you will need both.

Yeah. ecore_time_unix_get is still based on HAVE_GETTIMEOFDAY. But should that function be compiled in an Windows environment?

yes please

see D12112

Oh right right. I should apply that before this one?

I think the order doesn't matter. But as HAVE_GETTIMEOFDAY was not defined you will need both.

the order DOES matter, just look at the code in D12112 !

vtorri updated this revision to Diff 31063.Aug 26 2020, 11:44 AM

define HAVE_GETTIMEOFDAY if not defined
some formatting in evil_dlfcn.h too

jptiz accepted this revision.Aug 27 2020, 12:54 AM
This revision is now accepted and ready to land.Aug 27 2020, 12:54 AM
stefan_schmidt accepted this revision.Aug 31 2020, 5:23 AM
This revision was automatically updated to reflect the committed changes.