but the problem is when I set the time it is 20-30 second to late
So, there is something wrong with your code. Fix it.
and when it pase 59 second it is started to count 10,20,30,40,50,60,70,80,90
It most definitely does not. You just aren't overwriting the 0 on the end when you display (incorrectly, obviously) the new value.
The values should be displayed like:
12:30:58
12:30:59
12:31:00
12:31:01
Not
12:30:58
12:30:59
12:31:0
12:31:1
(which I'm sure, without even seeing your code, is what you are doing.)