Leaving aside the 3ds emulation level options then not unless the game tracks it as part of its own saving*. I will also note if you are on an emulator then various Lua scripts have done similar things (for the NES but much the same idea I saw one for metroid once and as it is lua it should be easy enough to implement.
https://fceux.com/web/help/LuaFunctionsList.html ).
*you can see hidden ones. I doubt I would go looking in general (it would probably be a similar approach to what we use to find hidden key combos to unlock things, though you might try cheats as well as it will presumably always be changing/counting up and you can check back at various points during play to get some idea of if it is actually what you think) but if there is a cheat/challenge run discovered that reads along the lines of have to be here under a certain time/beat under a certain time then naturally there has to be a timer.
The DS has no underlying OS you can fiddle with though. To that end you will have to do your own. Depending upon what level you want to go to it might not be that bad to add a counter to the vblank routine and have that be included in the save (or find a point that is redundant in the save -- most DS saves are not piecemeal efforts of only valuable data and instead more dump this section regardless) and include that in it. You will have to grab the save from whatever and read it out yourself but easy enough to do (biggest trouble there will probably be making sure you have the current version of the save as things like pokemon might alternate between two slots to have backup and not hammer the same area of memory all the time). If you want to have it available in the game at some level that will take some more work, though perhaps less than some might think if you can tap into something already reading out a value and putting it on screen. The DS does have an onboard clock, though I would probably still go for a manually incremented counter even if it was not only second accurate (
http://problemkaputt.de/gbatek.htm#dsrealtimeclockrtc , also not sure what the time to read and decode might be vs counter. Do also bear in mind at 60 hits a second you have about 20 hours for the timer if using a 32 bit value -- (2^32 all divided by 60 to get the seconds) so you will probably want to double up or do something a bit more fun for bounds checking if this is going to be for a long RPG or something rather than a speedrun of a puzzle game).
There are actually some people that do this sort of thing -- various speedrun types (TAS and conventional) either want it as a quasi cheat/internal read out of state for things that happen on timed events (you can sort of tell by the music in Zelda, for Mario on the NES it is popular to have a cheat that replaces the score with more internal timers than the basic timer affords) or to replace the usually less accurate internal clocks (if your hobby counts fractions of a second and the accuracy over a level is more like half a second, and over the game then that adds up somewhat).
Guides are going to be a bit thin on the ground as anybody playing at this level will already be well versed in assembly and general ideas of coding that cover the what, why, when, where and how of such things (earlier I mentioned vblanks, which is great and you will probably get the in game ones happily enough but if there are others for different levels/menus then that is a different matter, though maybe desirable at some level. This would be one example of something that might trip someone up and another was the 32 bit limitation thing earlier).