Duration of action is the length of time a medicine produces a meaningful effect. It depends on how much was taken, how fast the body clears it, and how sensitive the person is, so ranges quoted in references are averages rather than promises.
Duration of noticeable effect and duration of measurable presence in the body are different things, and the second is usually longer.