Remove Dependence on unistd.h and sys/time.h
ClosedPublic

Authored by twighk on Oct 12 2019, 8:28 AM.

Details

Summary

Removed unistd.h and sys/time.h, and refactored getMillisecOfNow() as appeared to be duplicated code.

Compiles with MSVC using craft.

Diff Detail

Repository
R391 KBlocks
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
twighk created this revision.Oct 12 2019, 8:28 AM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptOct 12 2019, 8:28 AM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
twighk requested review of this revision.Oct 12 2019, 8:28 AM

Just for info. Did you test it on linux too ?

Just for info. Did you test it on linux too ?

No. Sorry, i only tested it on windows.

twighk updated this revision to Diff 67795.Oct 12 2019, 3:23 PM

Copied the diff to test on linux

It builds and runs on my linux box. I couldn't work out how to get the previous patch to apply, so remade it.

cullmann accepted this revision.Oct 12 2019, 4:19 PM
cullmann added a subscriber: cullmann.

Looks reasonable for me, and should be C++11 API.

This revision is now accepted and ready to land.Oct 12 2019, 4:19 PM
aacid added a subscriber: aacid.Oct 13 2019, 5:06 PM
aacid added inline comments.
utils.h
6

i'm a bit unhappy with a floating function here.

Would be happier if it was inside a namespace Utils {}

What do you think?

twighk updated this revision to Diff 67859.Oct 13 2019, 5:52 PM
  • Put utils in namespace.
aacid accepted this revision.Oct 13 2019, 8:45 PM

The code is too C++-y to me, but it works :D

On the other hand since this is a relatively "big" change i think this should just go to master and not to Applications/19.08

This revision was automatically updated to reflect the committed changes.
twighk marked an inline comment as done.