Get last accessed timestamp value of a user in Drupal 8
getLastLoginTime is not a static method so you would not be able to call it statically like that. You need to get the current user object from a couple of different ways:

1. Use the Drupal::currentUser.

This is easy, but not recommended to tightly-couple your block.

2. Inject the current_user service into your Block by implementing ContainerFactoryPluginInterface.

The disadvantage is that this also has a dependency on the container, but can be mocked.

3. Use the Context system because blocks extend ContextAwarePluginBase.

This is the recommended option in my opinion because there is already a current user context (as well as node contexts) for blocks.

 * @Block(
 *   ...
 *   context = {
 *     "current_user" = @ContextDefinition("type" = "entity:user", "label" =&gt; @Translation("Current User")
 *   }
 * )


Then $current_user = $this-&gt;getContext('current_user') will get the current user.

Unfortunately there is not a handbook page about using contexts so documentation is relegated to guessing things based on the change record, which itself was no longer accurate at the time of writing this answer.

Interestingly some IDEs (cough PhpStorm 10 cough) choke on the above annotation syntax because.

Finally...

You should look at the documentation for render arrays and the changes to make markup safe.