Posts Tagged datetime

C++ For C# Developers: Part 41 – System Integration Library

Tags: , , , ,

A programming language without access to the underlying system is of little use. Even a “Hello, world!” program requires the OS to output that message. Today we’ll start looking at the system access that the Standard Library provides. We’ll see how to access the file system, so-called “smart” pointers, and check the time using various system clocks.

Read the rest of this article »

2 Comments

DateTime Performance

Tags: , ,

Unity’s Time class is an easy way to get the relative time. You can find the time since the app started with Time.time or the time between frames with Time.deltaTime. But what if you want to know the absolute time? You may need to display a clock to the user, send a timestamp over a network, or record when a game was saved. This is where System.DateTime comes in. It’s powerful and offers so much functionality that it’s natural to worry about about how slow it’ll be. So today’s article puts it to the test to find out how much time is being spent in operations like DateTime.Now which gets the current date and time. Is it quick enough that you shouldn’t worry? Read on to find out.

Read the rest of this article »

No Comments