Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,19 @@ public final void onCreateTasks(@NotNull final LifecyclePosition position,
* @return The time.
*/
public final long reloadWithTime() {
return reloadWithTime(true);
}

/**
* Reload the plugin and return the time taken to reload.
*
* @param cancelTasks If tasks should be cancelled.
* @return The time.
*/
public final long reloadWithTime(final boolean cancelTasks) {
long startTime = System.currentTimeMillis();

this.reload();
this.reload(cancelTasks);

return System.currentTimeMillis() - startTime;
}
Expand Down
Loading