How to use mikroC oscillator frequency in my code?
MiKroC has inline functions Clock_MHz() and Clock_kHz(), which return the device clock frequency rounded to the nearest MHz or kHz respectively.

They are documented in the help system under "MickroC PRO for PIC specifics/Built-in Routines".