I guess the easiest way to implement this would be to just periodically check if a specified process is running and if so start counting.
The way ps4 would handle it wont work on Steam games though. The console would not await the end of the game as it doesn't really launch the game either. It'll launch Steam and stop. The actual launching then is done by Steam. Some games even make their executables launch themselves from Steam if you double click them.
Implementing that batch technique in Launchbox would also require to synchronously await the end of the game and therefor blocking Launchboxes UI thread for the whole time your game is running. Thats not acceptable from a users point of view which is why having the UI always responsive is one of the main priorities of applications.