Time does come into it. If you are doing work at a certain rate (ie Power) for example in joules per second, the longer you continue the more work you will do.
A kW is a rate of doing work or a power of one thousand joules per second. If you do that for an hour the total energy is 3600 seconds...