# Solved Ticks VS Seconds

Comments in 'Plugin Development' started by ImagicalGamer, Jul 21, 2016.

1. Offline

### ImagicalGamerActive Member

Joined:
Feb 25, 2016
Posts:
141
Minecraft User:
I have a question about Ticks vs Seconds. Obviously 20 ticks or so are in a second but when scheduling tasks (in plugins) should I set the time as (20 * 1) = 1 sec or just (1)? Does PocketMine convert to seconds or should I go based off of ticks?
2. Offline

### YeelzeNew Member

Joined:
Apr 2, 2016
Posts:
31
Minecraft User:
1*20, it will run every second if you are using a RepeatingTask.
ImagicalGamer likes this.
3. Offline

### CraftYourBukkitNotable MemberPlugin Developer

Joined:
Jan 20, 2015
Posts:
1,022
Plugins:
2
Minecraft User:
Yea, 20 ticks = 1 sec.
You need to use ticks. Though, why 20 * 1? Just use 20.
hoyinm14mc likes this.
4. Offline

### ImagicalGamerActive Member

Joined:
Feb 25, 2016
Posts:
141
Minecraft User:
Easier to do 20 * \$mySec than irl multiply 20 by \$mySec.
5. Offline

### CraftYourBukkitNotable MemberPlugin Developer

Joined:
Jan 20, 2015
Posts:
1,022
Plugins:
2
Minecraft User:
So it's easier to calculate 20 * 1 instead of then just use 20?
6. Offline

### ImagicalGamerActive Member

Joined:
Feb 25, 2016
Posts:
141
Minecraft User:
If I was gonna use 1 second I would just do 20 but most of the time it's more than one second.
7. Offline

### CraftYourBukkitNotable MemberPlugin Developer

Joined:
Jan 20, 2015
Posts:
1,022
Plugins:
2
Minecraft User:
Well, we were actually talking about your question, which was basically saying 1 second. We weren't talking about "most of the time".
8. Offline

### ImagicalGamerActive Member

Joined:
Feb 25, 2016
Posts:
141
Minecraft User:
I apologize for not being more specific and applying my situation to all cases.
9. Offline

### SOFeBanned

Joined:
May 28, 2016
Posts:
386
Minecraft User:
{{Citation needed}}
(I know it is true, but it is fun to find some citation here)