world.getTotalWorldTime() increases every tick. You can use this to create your own scheduler. If you use a tick event you can use an if statement to check if the totalworldtime has increased by 100 ticks (which is 5 seconds).
You basically have 2 options: one being the already mentioned tick events which are run 20 times per second, so you could just check if the remainder of the current world time and your delay (in ticks) is 0, then print the message. Note that this might not be exactly the desired time, as the server may experiences lag and skips ticks, and then schedules the updates more frequently to keep up.
The other option would be a java Timer that executes your task. That will be more precise, however note that it will be run in a separate thread, so you have to schedule all actions that interact with the world or entities on the main thread. The Minecraft and MinecraftServer class respectively have public methods to do so.