Let's assume your sine function depends on time and its time domain is supposed to be infinite (time: −∞ to +∞). Then, if all 360° (2*π) of phase change takes time t, the frequency is 1/t.
Non-infinite time domains makes things quite complicated. If, for example, the function is zero (or any other constant value) everywhere except some fixed segment on the time axis, such as the segment depicted on your image, the spectrum will be
continuous (and rather wide, in that case). It is calculated as
Fourier transform https://en.wikipedia.org/wiki/Fourier_transform[
^].
If the function is
strictly periodical ("strictly" also implies infinite domain in time), the spectrum is
discrete and is calculated as the
Fourier series:
https://en.wikipedia.org/wiki/Fourier_series[
^].
Note that a spectrum consists of the points which are characterized not just with frequency, but frequency/phase, which, apparently also can be expressed as a complex number.
The case of the sine function on an infinite time domain I mentioned fist is just the special case of strictly periodic function, which is trivial and makes the discrete spectrum of just one line at the frequency 1/t and some phase.
—SA