permaweb / aos

An operating system for AO: The hyper parallel computer
https://ao.g8way.io
Other
68 stars 46 forks source link

feat(aos-process): os.time should return the msg.Timestamp #276 #295

Closed PeterFarber closed 1 month ago

PeterFarber commented 2 months ago

Closes #276

Overview

This PR allows users to access the most recent msg.Timestamp via os.time() for a more intuitive user experience.

Changes

Added a single line to the process.handle method os.time = function () return msg.Timestamp end which overides the os.time() method to return msg.Timestamp.

Added a test to handlers.test.js to confirm functionality.