How to get current timeframe?

 
Greetings, Does anyone know if there is some function to get the current chart time frame? I realize that this info can be obtained by comparing times of 2 adjucent bars, but this approach is definitely more involved. Thank youin advance.
 
Period()
 
Thank you, irusoh1
Reason: