Use time command before your command:
time command
What does it do?
time (1) - run programs and summarize system resource usage
For your situation:
time openssl aes-256-cbc -a -salt -in abc.zip -out abc.zip.enc
It will output something like:
real 0m2.199s
user 0m0.008s
sys 0m0.008s
The time in user section is what you are looking for, the time that user space worked on your process.
The sys is related to kernel and the real is what you are getting right now with your echo solution, your clock time from running to the end with the time you spend for entering the password.