There are two different methods for measuring hashing speed. The first one, used by NiceHash Miner, is measuring the number of iterations which show you the actual speed. Measuring iterations can be done only inside the software and cannot be done remotely.
The second measuring method is statistical calculation according to the number, frequency and difficulty of the submitted shares. This is the effective speed, shown online - NiceHash web site (my miner). Because this method is statistical and because it has a measuring window of 5 minutes, it can never be as accurate as local measuring of iterations. But, due to statistic distribution, your average speed online over longer periods of time (several hours, days) should be within +-2% of your actual speed, shown in NiceHash Miner.
Do note that you are paid according to your effective speed and not according to your actual speed, because we reward miners for every accepted share.