What is the difference between setting the session time out in DD and setting the time out programmatically?

In DD(Deployment descriptor) time out is specified in terms of minutes only. But in programmatically it is specified in seconds. A session time out value of zero or less in DD means that the session will never expire. To specify session will never expire programmatically it must be negative value.