Timed how?
Elapsed time from the startup? ex. Computer runs 7 hours then shuts down.
Scheduled time? ex. Computer shuts down at 6PM.
For the first one I would write a windows script as dates and times are better handled with script than with batch code.
For the second one, I would use the task scheduler and simply schedule the shutdown.
8-)