It's a similar situation on iOS, where new developers sometimes use (in Objective-C) `[[NSDate date] timeIntervalSince1970]` which is natural, but wrong. NSDate draws from the network synchronized clock and will occasionally hiccup when re-synching it against the network, among other reasons.
If you're looking at measuring relative timing (for example for games or animation), you should instead use `double currentTime = CACurrentMediaTime();` That's the correct way.
I'm sure this question is important to ask to learn how to protect yourself, but it struck me as a question that is difficult to ask. By asking it, you sound like someone who wants to exploit others vulnerabilities rather than someone who is trying to protect themselves.
We're looking for software engineers and developers! Help build the most professional Bitcoin exchange.
• iOS, backend, frontend and full-stack engineers
Join Kraken and enjoy the first truly professional trading platform for Bitcoin and other math-based currencies (cryptocurrencies). We have robust technology, rock-solid security, and a proactive approach to regulatory compliance.
Sadly, the core client has the job of being capable of bootstrapping itself starting at the genesis block and ending at the most recent block.
That means that, barring a huge design change in Bitcoin itself, the core client has to support every single feature ever implemented in Bitcoin, no matter how half-assed or poorly thought out.
That's why things like the way P2SH got implemented really grind my gears. Bitcoin has a few idiosyncratic and unintuitive design additions that make it really hard to make simple clients.
Hold your own keys yourself, possibly with the addition of multi-sig service(s) to make this safer and more convenient. That is undoubtedly the long-term vision of bitcoin, and it's quite different from banks/USD.
If you're looking at measuring relative timing (for example for games or animation), you should instead use `double currentTime = CACurrentMediaTime();` That's the correct way.