Yes, provided you are using a shell and system that allows limit control. For example, in bash:
ulimit: ulimit [-SHacdfilmnpqstuvx] [limit]
Ulimit provides control over the resources available to processes
started by the shell, on systems that allow such control. If an
option is given, it is interpreted as follows:
-S use the `soft' resource limit
-H use the `hard' resource limit
-a all current limits are reported
-c the maximum size of core files created
...
-t the maximum amount of cpu time in seconds
...
-- excerpt from man bash