Sample accurate time

Hi everyone! I'm new to juce. What would be the best way to get a global sample accurate time? I am thinking that I could implement some sort of sample counter but that would need audio being played... is there a way to achieve something similar without having audio playing?


A time for what purpose?

My first reaction: spend some fulltime weeks/months programming with Juce and then ask exotic questions.

It took me quite a while to get into C++, Juce and DSP literature and asked some trigger happy questions like you do now when I started. Which I regret now ;-)

Invest time and then be very specific when you get stuck. I don't have the impression that you are stuck right now.

Dive in first, success!