{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihpcu2vokgygjlnglp7r37yxkgk63xoqsxoxc5l7zag6zstcizjbm",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mgn55umxpch2"
  },
  "path": "/t/ann-type-safe-diffutctime/13778#post_2",
  "publishedAt": "2026-03-09T13:51:39.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "unsafeIOToSTM"
  ],
  "textContent": "So… do you believe this is a better solution than testing the application and, perhaps, logging the delta time?\n\n* * *\n\ndyaitskov:\n\n> The STM package is shipped without a function to get current time.\n\nHave you read the documentation to unsafeIOToSTM?\n\ndyaitskov:\n\n> Let’s consider a situation where we read an integer from a queue, perform a lookup of a timestamp based on that integer, and add current delta time to a mutable variable within the same STM transaction.\n\nNot clear when this situation might arise, please elaborate.",
  "title": "[ANN] type safe diffUTCTime"
}